The Schedule control supports the CRUD operations (Create, Read, Update, Delete) by using the Web Services methods.
The following steps help you perform the CRUD operations like adding, editing and deleting actions on the Schedule control by using the web services in the ASP.NET (EJWEB) application.
Step 1: Create the ASP.NET application and include the EJWEB Schedule control in it by referring the following KB link,
Step 2: Create a database table with the necessary fields, as follows.
SQL Table Script
Note: You can create the table through Visual Studio as a local database or by using SQL Server Management Studio.
Step 3: Add the connection String configuration in the Web.Config page. Refer to the following code example.
Note: Change the ConnectionString value based on the database connection. Here, the “local database” connection string is mentioned.
Step 4: Create a web service with the CRUD operation functionality using the following steps:
Figure 1: Creation of the webservice
Figure 2: WebService1.asmx.cs/ WebService1.asmx.vb file
Step 5: Build the sample and add the WebReference to your application using the following steps,
Figure 3: Select the Add ServiceReference option
Figure 4: WebService details
Figure 5: Service Reference Settings window
Figure 6: Add Web Reference
Figure 7: WebServices details
Figure 8: Details of the created WebServices
Figure 9: Reference added
Step 6: Make use of the server-side events of the Schedule control and also map the field names to the Schedule control’s appointmentSettings to perform the CRUD operation.
Step 7: Define the server-side methods with appropriate functionalities in the code behind the page. Also, call the web service methods within each of the following server-side methods appropriately.
Step 8: Run the sample and now you can perform CRUD operations on the schedule appointments that are reflected appropriately in the WebServices too.
This page will automatically be redirected to the sign-in page in 10 seconds.