protected void DayPilotScheduler1_Notify(object sender, DayPilot.Web.Ui.Events.Scheduler.NotifyEventArgs e) { foreach (DayPilotEventArgs ea in e.Queue) { if (ea is EventMoveEventArgs) { EventMoveEventArgs em = (EventMoveEventArgs)ea; #region Simulation of database update DataRow dr = table.Rows.Find(em.Id); if (dr != null) { dr["start"] = em.NewStart; dr["end"] = em.NewEnd; dr["column"] = em.NewResource; table.AcceptChanges(); } else { throw new Exception("Event id not found."); } #endregion } else if (ea is EventUpdateEventArgs) { DayPilotScheduler1_EventUpdate(sender, (EventUpdateEventArgs)ea); } } }
protected void DayPilotScheduler1_Notify(object sender, DayPilot.Web.Ui.Events.Scheduler.NotifyEventArgs e) { foreach (DayPilotEventArgs ea in e.Queue) { if (ea is EventAddEventArgs) { EventAddEventArgs em = (EventAddEventArgs)ea; DayPilotScheduler1_EventAdd(sender, em); } else if (ea is EventMoveEventArgs) { EventMoveEventArgs em = (EventMoveEventArgs)ea; DayPilotScheduler1_EventMove(sender, em); } else if (ea is EventRemoveEventArgs) { EventRemoveEventArgs em = (EventRemoveEventArgs)ea; DayPilotScheduler1_EventRemove(sender, em); } else if (ea is EventUpdateEventArgs) { DayPilotScheduler1_EventUpdate(sender, (EventUpdateEventArgs)ea); } } string msg = String.Format("Queue saved ({0} actions).", e.Queue.Count); DayPilotScheduler1.UpdateWithMessage(msg); }