public async Task UpdateCalendarData(Syncfusion.UI.Xaml.Schedule.AppointmentEditorClosedEventArgs e)
        {
            MappedAppointment appointment = e.EditedAppointment as MappedAppointment;
            MappedAppointment original    = e.OriginalAppointment as MappedAppointment;

            appointment.CalendarDataID = original.CalendarDataID;
            appointment.LeadID         = original.LeadID;


            ServiceLayer s1 = ServiceLayer.getInstance();

            s1.CalData           = s1.CalendarDataList.Find(c => c.EntryID == appointment.CalendarDataID);
            s1.CalData.StartTime = appointment.MappedStartTime;
            s1.CalData.EndTime   = appointment.MappedEndTime;
            s1.CalData.Note      = appointment.MappedNote;

            await s1.MakeRequest(s1.CalData, typeof(DTO_CalendarData), "UpdateCalendarData");

            if (s1.CalData.SuccessFlag)
            {
                MessageBox.Show(s1.CalData.SuccessFlag.ToString(), "Success", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
            else
            {
                MessageBox.Show(s1.CalData.SuccessFlag.ToString(), "Failure", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }
        private async void calendar_AppointmentEditorClosed(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorClosedEventArgs e)
        {
            if (e.EditedAppointment != null && e.Action == Syncfusion.UI.Xaml.Schedule.EditorClosedAction.Save)

            {
                if (e.IsNew)
                {
                    //create new record
                }
                else if (!e.OriginalAppointment.Equals(e.EditedAppointment))
                {
                    Controllers.Schedule schedule = new Controllers.Schedule();
                    await schedule.UpdateCalendarData(e);
                }
            }
        }
 private void calendar_AppointmentEditorClosed(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorClosedEventArgs e)
 {
     throw new NotImplementedException();
 }