protected override void OnEventResize(DayPilot.Web.Mvc.Events.Calendar.EventResizeArgs e) { var eventDto = _timeTableService.GetEventDTOById(new Guid(e.Id)); eventDto.Start = e.NewStart; eventDto.End = e.NewEnd; _timeTableService.UpdateEvent(eventDto); Update(); }
protected override void OnEventResize(DayPilot.Web.Mvc.Events.Calendar.EventResizeArgs e) //protected override void OnInit(DayPilot.Web.Mvc.Events.Month.InitArgs e) { kauppeedbEntities db = new kauppeedbEntities(); var eid = Convert.ToInt32(e.Id); //var toBeResized = (from ev in db.Varaus where ev.Varaus_id == Convert.ToInt32(e.Id) select ev).First(); var toBeResized = (from ev in db.Varaus where ev.Varaus_id == eid select ev).First(); toBeResized.Alku = e.NewStart; toBeResized.Loppu = e.NewEnd; //toBeResized.Alku = Convert.ToString(e.NewStart); //toBeResized.Loppu = Convert.ToString(e.NewEnd); //db.SubmitChanges(); db.SaveChanges(); Update(); }
protected override void OnEventResize(DayPilot.Web.Mvc.Events.Calendar.EventResizeArgs e) { new EventManager(Controller).EventMove(e.Id, e.NewStart, e.NewEnd); Update(); }