ComponentOne Scheduler for ASP.NET: Working with Scheduler for ASP.NET AJAX > Appointments > Contacts > Adding Contacts from a Database

Adding Contacts from a Database

If you have bound C1Schedule to a database, you can map the database contacts to the ContactStorage area of the C1WebScheduleStorage so the contacts can be loaded into your application.

1.   Configure the data source as explained in the Binding C1Schedule to a Data Source topic, and use the appropriate table and fields in your database:

      In the Configure the Select Statement window, when you select Specify columns from a table or view, choose the table containing resources from the Name drop-down box.

      Check the columns from your database to map to the C1WebScheduleStorage.

Once the data source is configured, you can map to each of the columns in the Contacts table. You can do this through Visual Studio's Properties window.

2.   Map the table from your database to the Contact Storage:

a.   Select C1Schedule on your form and expand the DataStorage node in the Properties window.

b.   Expand the ContactStorage node and set the DataSourceID property to AccessDataSource1, or your datasource.

c.    Expand the Mappings node and enter the column names from your database table in the MappingName properties for each mapping node. If you do not want to map all columns, you can leave the MappingName property blank. Only the TextMappingMapping field is required to be mapped.

3.   Run the project, double-click the time for a new or existing appointment, and click the Contacts button in the Appointment dialog box. The Contacts window appears, and all of the contacts from the database appear in the list of Available Contacts. Users can check any of these contacts to assign them to their appointments.


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