private void Button_Click_2(object sender, RoutedEventArgs e) { Appointment app = new Appointment(); UInt32 id = Initialpage.Get().GetPatientId(); app.PatientId = id; app.Description = tbDescription.Text; app.Date = dpDate.SelectedDate; Database.IAppointmentMapper mapper = PatientanlegerApp.Db.GetAppointmentMapper(); mapper.Insert(app); }
private void Button_Click(object sender, RoutedEventArgs e) { UInt32 id = Initialpage.Get().GetPatientId(); List <Appointment> appointments = new List <Appointment>(); Database.IAppointmentMapper mapper = PatientanlegerApp.Db.GetAppointmentMapper(); mapper.SelectFromPatient(ref appointments, id, dpUpperDate.SelectedDate, dpLowerDate.SelectedDate); appointmentGrid.Items.Clear(); foreach (var a in appointments) { appointmentGrid.Items.Add(a); } }