private void schedulerControl1_EditAppointmentFormShowing_1(object sender, AppointmentFormEventArgs e) { oldstate = new Model.Models.trangthaiphong { maphong = e.Appointment.Subject, thoigianbatdau = e.Appointment.Start, thoigianketthuc = e.Appointment.End }; DevExpress.XtraScheduler.SchedulerControl scheduler = ((DevExpress.XtraScheduler.SchedulerControl)(sender)); AppointmentFormOutlook2007Style form = new AppointmentFormOutlook2007Style(scheduler, e.Appointment, e.OpenRecurrenceForm); try { //Global.main.GoTo<AppointmentFormOutlook2007Style>(form, null, null); e.DialogResult = form.ShowDialog(); e.Handled = true; } finally { form.Dispose(); } }
private void schedulerStorage_AppointmentsChanged(object sender, PersistentObjectsEventArgs e) { foreach (Appointment app in e.Objects) { newstate = new Model.Models.trangthaiphong { maphong = app.Subject, thoigianbatdau = app.Start, thoigianketthuc = app.End, maca = app.Location, hientrang = "Free" }; TTBUS.Update(oldstate,newstate); } }
private void schedulerStorage_AppointmentsDeleted(object sender, PersistentObjectsEventArgs e) { foreach (Appointment app in e.Objects) { System.Diagnostics.Debug.WriteLine(app.End.ToString()); newstate = new Model.Models.trangthaiphong { maphong = app.Subject , thoigianbatdau = app.Start , thoigianketthuc = app.End }; TTBUS.Delete(newstate); } }