In client-side, WebSchedulerDisabledTime object should
be created and added to DisabledTime collection. After
the disabled time collection is added, WebScheduler needs to be refreshed using
Refresh function.
In this topic, you will learn how to create disabled time in client side.
To create Disabled Time in client side
Global Disabled Time
- Bind WebScheduler
to Access database.
- Add the following code in client-side:
function CreateDisabledTime()
{
var s = ISGetObject("WebScheduler1");
//add to global DisabledTime
var dt = new WebSchedulerDisabledTime();
dt.StartTime = new Date(2010, 2, 1);
dt.EndTime = new Date(2010, 2, 2);
s.DisabledTime.Add(dt);
s.Refresh();
}
|
Resource Disabled Time
- Bind WebScheduler
to Access database.
- Add the following code in client-side:
functionCreateDisabledTime()
{
var s = ISGetObject("WebScheduler1");
//add to resource DisabledTime
var dt2 = new WebSchedulerDisabledTime();
dt2.StartTime = new Date(2010, 2, 7);
dt2.EndTime = new Date(2010, 2, 8);
dt.IsAllDayArea = true;
var resource = s.GetResourceById("1");
resource.DisabledTime.Add(dt2);
s.Refresh();
}
|