private AppointmentCover InsertOneAppointment (DataRow Entry) { if ((Entry ["Von"] == Convert.DBNull) || (Entry ["Bis"] == Convert.DBNull)) return null; AppointmentCover EntryAppointment = new AppointmentCover (IntID, Convert.ToDateTime (Entry ["Von"]), Convert.ToDateTime (Entry ["Bis"]), Entry ["NameID"].ToString (), Entry ["ID"].ToString (), Entry); EntryAppointment.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler (EntryAppointment_PropertyChanged); ModellData.Appointments.Add (EntryAppointment); IntID++; return EntryAppointment; }
private AppointmentCover InsertOneAppointment (Termin Entry) { if ((Entry.Von == null) || (Entry.Bis == null)) return null; AppointmentCover EntryAppointment = new AppointmentCover (IntID, (DateTime) Entry.Von, (DateTime) Entry.Bis, Entry.NameId, Entry.Id, Entry); EntryAppointment.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler (EntryAppointment_PropertyChanged); ModellData.Appointments.Add (EntryAppointment); IntID++; return EntryAppointment; }
private bool DoModify (AppointmentCover App) { Window AppointmentWindow = new Window (); AppointmentWindow.Width = 600; AppointmentWindow.Height = 400; WordUpEventHandling WordUpEventHandlingControl = new WordUpEventHandling (); AppointmentWindow.Content = WordUpEventHandlingControl; App.TerminRow ["Von"] = App.StartTime; App.TerminRow ["Bis"] = App.EndTime; WordUpEventHandlingControl.TerminRow = App.TerminRow; AppointmentWindow.ShowDialog (); if (App.TerminRow.RowState == DataRowState.Modified) { return true; } return false; }
private bool DoModify (AppointmentCover App) { Window AppointmentWindow = new Window (); AppointmentWindow.Width = 600; AppointmentWindow.Height = 700; WordUpEventHandling WordUpEventHandlingControl = new WordUpEventHandling (); AppointmentWindow.Content = WordUpEventHandlingControl; App.TerminDataEntry.Von = App.StartTime; App.TerminDataEntry.Bis = App.EndTime; WordUpEventHandlingControl.TerminEntry = App.TerminDataEntry; AppointmentWindow.ShowDialog (); ((CsDbDataSetBase) Data.DbServer3.WordUp).SaveUnspecific(); Data.DbServer3.WordUp.AcceptChanges(); //if (App.TerminDataEntry.RowState == DataRowState.Modified) // { // return true; // } //return false; return true; }