Hi Infragistics,
How to merge all resources and activities in unique WebSchedule?
Best regards
Mike,
My solution did not incorporate displaying the appointments in any of the schedule views. I placed those appointments in a grid of appointments that could be sorted and grouped. When the appointment count and resource count grows large a grid is probably the cleanest look - since there is only so much room on a calendar entry point.
Regardless, I think a potential solution was provided by Derek Harmon in his 2008/04/01 post. It was only a hint of an algorithm and he was unable to provide any source, but... His solution seemed to depend on restyling the schedule view as it was generated and spoofing other resources into a single resource on the fly. It should be possible - but, styling is not my style - yuk yuk
Again, if you are displaying multiple appointments from multiple clients (or office slugs) it might be better to use jscatalina's algorithm to fill a 'datatable' and display the information in a WebGrid. I don't mean to be presumptuous, but them little boxes filled with lots of appointments for lots of people can get a bit confusing. Maybe, on the other hand, you can generate a tabbed view and display each individuals appointments on a separate tab.
By the way, I would like to thank jscatalina for his/her algorithm. It did get me away from a non-standard use of Infragistics stored procedures. It was far more reliable than my solution. And, in the end, the code was understandable.
Hi Roger and jscatalina,
I'm trying to implement exactly the type of solution you've described, but as new-ish user of WebSchedule, I'm struggling to get this to work as a single view of all appointments. I'm trying to render an aggreagted view in a dayview or monthview, but it's not clear to me how to render that with a loop of different activeresource names. I see that jcatalina loops the resources, then loops the days, getting a collection of appointments for each day - but what then happens to that collection - in other words, the point in the example which is commented with " //store your appointments in collection" ?
How exactly do we get that collection to render in a single day or month view control?
Thanks in advance for any pointers you can give.
Mike
jscatalina,
I am going to try your solution. I came up with one based on the data structures and reverse engineering the stored procedures provided by Infragistics. I think I can present your solution in a grid of activities for multiple people for a specific date!!! That is huge when the administrators of an office need to see all appointments for a specified date - and not have to poke through calendars for each individual in their command/office.
I am very concerned that my kluge will be very fragile since it does not act on the methods and properties documented by Infragistics.
By the way, It is not difficult to attach multiple resources to one activity. The Infragistics supplied tables seem to be designed for this (the ActivityResource table) but I think the api/user interface problems may have relegated that option to a future release. For example, if five folks are attached to a meeting (ie. five ActiveResources with the same Activity in the ActivityResource table) than what happens when someone clicks the Delete option. Maybe that guy is just stating he/she wants to bail from the meeting. Gets dicy.
heres how I get my all appointments for the month . code may be broken just copy and pasted and omitted some code. can't find anything better and this one is not that slow.
DateTime activeDate = Convert.ToDateTime(WebScheduleInfo1.ActiveDayUtc.ToShortDateString());
int months = DateTime.DaysInMonth(activeDate.Year, activeDate.Month);
//get all resource
//loop through all resources
{
WebScheduleInfo1.ActiveResourceName = employee;
//loop through all the days of the month
this.WebScheduleInfo1.DataBind();
ActivitiesSubsetCollection _coll = WebScheduleInfo1.GetAppointmentsForDate(WebScheduleInfo1.ActiveResource, dt);
//store your appointments in collection
}
No I do not.