Intersoft Support Center

Create Disabled Time in Client-Side

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

  1. Bind WebScheduler to Access database.
  2. Add the following code in client-side:
    JavaScript Copy Code
    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

  1. Bind WebScheduler to Access database.
  2. Add the following code in client-side:
    JavaScript Copy Code
    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();
    }
Previous Next