private void Add() { this.ucDefault1.PostEditor(); Database.tblContactAppointment contactAppointment = new Database.tblContactAppointment(); contactAppointment.FKContact = this.modulData.FKSelected[0]; contactAppointment.StartDateTime = System.DateTime.Now; contactAppointment.StartDateTime = System.DateTime.Now.AddHours(1); int datasourceindex = this.tblContactAppointmentBindingSource.Add(contactAppointment); }
private void schedulerControl1_SelectionChanged(object sender, EventArgs e) { if (schedulerControl1 != null && schedulerControl1.SelectedAppointments.Count > 0) { Database.tblContactAppointment a = schedulerControl1.SelectedAppointments[0].RowHandle as Database.tblContactAppointment; if (a != null) { this.tblContactAppointmentBindingSource.Position = this.tblContactAppointmentBindingSource.IndexOf(a); } } }