We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Get the selected resource

Hi all,

How can I get the select resource data of Schedule control?.

The situacion is:

I'm new to Syncfusion, and trying to use the Schecule control of ASP.NET Classic.

I could show the appointments saved in the database, and also I could use Window control to use custom window to add the appointment, but I could not find yet the property to get the selected resource code, to save to  database the new appointmente.

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team March 20, 2017 12:59 PM UTC

Hi Victor,   
   
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   
  


Loader.
Live Chat Icon For mobile
Up arrow icon