Resources groups

Hi,
I would like to use this application to schedule appointments of N subjects(the rooms in your example, right?). A calendar for each subject.
Appointments are entered by M secretaries, each of which must be able to see only a subset of N subjects. My question is:

Can this scheduler manage resources groups associating them to different users (M secretaries)?
Is there an example please?

I also have a technical question:
Your examples can only run on DB on Sql Server 2008?

Thanks for everything

David

Hello,

scheduler don’t process data itself, so you need to implement some logic to do this assotiation.
it can be done fairly easy, so answer to your question is yes.
demo app is attached - there is two(M) users and four rooms(N), each user manages it’s own subset of rooms

all of the samples uses mssql2008(i’ve attached db dump for mssql2005, if you’re using this version)
ResourcesGroups.zip (524 KB)

Great, it is exactly what I want!

A secretary may have to handle 100 people(rooms), what is the best view to obtain a good view?
Timiline?
Do you suggest some other way?
I tryed to add the timiline view, but I can not see the grid below.
It’s possible to filter the view by the room name?
Can you assign a different color for each room? I thinks so.

Thanks a lot.

yes, i think timeline view will be a better option for big amounts of resources

try to specify render mode:

var units = new TimelineView("rooms", "room_id"); units.RenderMode = TimelineView.RenderModes.Bar;//<--- here it is units.Label = "Rooms"; units.AddOptions(context.Rooms); sched.Views.Add(units);

check ‘Server side filtering ajax’ sample from the package. You can also set client-side filters, so events will be filtered without reloading them from the server

color of the event can be defined by it’s ‘color’ and ‘textColor’ properties. So you can set color depending on it’s room

Hello, Alexandr.
Can you please provide MVC 3 version of ResourcesGroups project?
Thank you very much in advance.

Hi,
do you want version for mvc3 and Razor engine, or just mvc3 and aspx(which will be almost the same as current version)?

razor please if I can choose :slight_smile:

sure, I’ll try to post it tomorrow

Thanks a lot Aliaksandr. Sorry for misspelling your name the first time. Just now I realized that.
Will wait for tomorrow. Thanks again!

Hello,
here is the sample
ResourcesGroups_Razor.zip (520 KB)

Thanks very much, highly appreciate this!

Hi Aliaksandr,
The razor version is working great, the only problem I am having with it - every time I logoff, it gives this weird error
Microsoft JScript runtime error: Unable to set value of the property ‘value’: object is null or undefined
on the line 34 in LogOn: document.getElementById(“UserName”).value = value;

Is there a way to avoid it please?
Thanks

Hello,
go to LogOn.cshtml and remove this line(line:19)

updateCredentials("test");

it should fix the problem

Hello Aliaksandr,
I am testing this solution for scaling: I inserted about 500K events into events table spanning between years 1900 and 2100 (half for “user”, half for “test”). This is normal situation to have large number of events in the calendar if I work with large number of users.

Upon retrieving them, I get the following error in HomeController line 65 ( return new SchedulerAjaxData(events)):
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

My question to you is this: how can I limit events I need to retrieve only to the range the scheduler is showing (whether month/week/day view), and not retrieve the entire calendar for the user?
This will not only allow me to retrieve it properly, but also will allow the retrieval be so much faster.

Thanks in advance!

Hi,
you can set a mode for data loading

DHXScheduler.Data.Loader.EnableDynamicLoading(SchedulerDataLoader.DynamicalLoadingMode mode);

available options are ‘month’, ‘day’, ‘year’.
In this case client-side scheduler will send requests as

someurl?from=Date1&to=Date2 where Date1 and Date2 are date values in yyyy-mm-dd format, you can use these values to filter events before render them

Aliaksandr,
Thank you very much for your irreproachable support. I got it working for numerous events pretty fast now. I will ask more should I have questions, it seems that your DHTMLX Scheduler will be my control of choice, but its too early to say, I am still experimenting.
Thanks again! Great support worth even more than the product itself!

Hello again,
Another question:
I was using your razor example (which is great by the way) and following this tutorial http://scheduler-net.com/docs/recurring_events.html for making events recurrable.
Then I wanted to add LightboxMiniCalendar to scheduler.
What I found out is that once default set of Lightbox controls is added (and nothing else) recurring events work fine. But as soon as I add LightboxMiniCalendar (or change Lightbox in any way that is different from standard defaults), recurring effect vaporizes as if it is not defined at all.

My question is - how do I replace LightboxTime with LightboxMiniCalendar and at the same time have recurring events working.

Thank you very much in advance.

Hello,
you need to add LightboxRecurringBlock to your lightbox. This control is added to the default lightbox when you enable recurring extension, in case of any customization you have to add it manually,
code:sched.Lightbox.Add(new LightboxMiniCalendar("auto", "Time")); sched.Lightbox.Add(new LightboxRecurringBlock("rec_type", "Recurring"));
note control should be mapped to ‘rec_type’ property

Thanks you ! That worked.

Another question:
I getting completely weird “A circular reference was detected while serializing an object”
exception at public ActionResult Data(){ … return new SchedulerAjaxData(events);} line

I am sure there are no circular reference. Here’s data dump from the DB:
Id text start_date end_date rec_type event_pid length biz_Id
2 New event 4/18/201211:30:00 AM 4/18/2012 12:30:00 PM NULL NULL 1

IN the biz table (the one referenced from here) there’s no reference to this table at all. I don’t understand where this circular reference coming from, maybe its just misleading message?

Please shed some light into this issue.
Thank you in advance!