ComponentOne Scheduler for ASP.NET: Working with Scheduler for ASP.NET AJAX > Appointments > Resources > Adding Resources to the Master Resources List

Adding Resources to the Master Resources List

Scheduler for ASP.NET AJAX supports resources created at run time through the Master Resources List dialog box or by adding code to the form at design time. Once added to the master list, the resource can be assigned to an appointment.

To add a resource at run time:

1.   Add a new or open an existing appointment.

2.   Click the Resources button in the Appointment dialog box. The Resources dialog box appears.

3.   Click the Master List button.

 

 

4.   In the Master Resources List, enter a resource in the text box and click Add.

 

 

The new resource is added to the list.

5.   Click OK to close the Master Resources List dialog box.

To add a resource programmatically:

The following code, added to the Page_Load event, creates a Digital Projector resource at design time.

      Visual Basic

' Create the Digital Projector resource.

Dim rescol As C1.C1Schedule.ResourceCollection

rescol = Me.C1Schedule1.DataStorage.ResourceStorage.Resources

Dim roomres As New C1.C1Schedule.Resource

roomres.Text = "Digital Projector"

 

' Insert the resource into the Main List of Resources.

rescol.Insert(0, roomres)

      C#

// Create the Digital Projector resource.

C1.C1Schedule.ResourceCollection rescol;

rescol = this.c1Schedule1.DataStorage.ResourceStorage.Resources;

C1.C1Schedule.Resource roomres = new C1.C1Schedule.Resource();

roomres.Text = "Digital Projector";

 

// Insert the resource into the Main List of Resources.

rescol.Insert(0, roomres);

When you run the application, the new resource appears in the Resources dialog box when the Resources button is clicked in the Appointment dialog box:

 


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.