Thank you for contacting Syncfusion support.
We would like to inform you about our new ASP.Net platform since you’re new to Syncfusion controls. ASP.Net platform controls has more features and enhanced performance compared to ASP.Net classic controls and please visit the below links to know more about ASP.Net controls. We have prepared the resource CRUD sample in ASP.Net platform which can be download from the below location.
Please refer the below code example used in the sample.
<Code>
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static List<ScheduleAppointment> GetData() // This will trigger to bind the appointments data to schedule control
{
return new ScheduleDataDataContext().ScheduleAppointments.Take(10).ToList(); // nw.Appointment.Take(5);
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
// This will trigger while saving the appointment through detail window
public static List<ScheduleAppointment> CrudResult(List<ScheduleAppointment> added, List<ScheduleAppointment> changed, List<ScheduleAppointment> deleted)
{
ScheduleDataDataContext db = new ScheduleDataDataContext();
int intMax = db.ScheduleAppointments.ToList().Count > 0 ? db.ScheduleAppointments.ToList().Max(p => p.Id) : 0;
if (added != null && added.Count > 0)
{
----------
----------
}
if (changed != null && changed.Count > 0)
{
----------
----------
}
if (deleted != null && deleted.Count > 0)
{
----------
----------
}
return db.ScheduleAppointments.ToList();
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static List<ScheduleAppointment> InsertData(ScheduleAppointment value) // This will trigger while saving the appointment through quick window
{
ScheduleDataDataContext db = new ScheduleDataDataContext();
---------
---------
}
[WebMethod]
public static List<ScheduleAppointment> UpdateData(ScheduleAppointment value) //This will trigger while saving the resize or drag and drop the appointment
{
ScheduleDataDataContext db = new ScheduleDataDataContext();
----------
----------
}
[WebMethod]
public static List<ScheduleAppointment> RemoveData(string key) // This will trigger to delete the single appointment
{
ScheduleDataDataContext db = new ScheduleDataDataContext();
------------
------------
}
</Code>
Note: If you wish to proceed in Classic platform, please revert us.
Regards,
Karthigeyan