private void btnUpdate_Click(object sender, RoutedEventArgs e) { getRow(e); EntityFactory.Term = currentRow.Item as term; EntityFactory.Reservation = EntityFactory.Term.reservation; CreateReservation createReservationControl = new CreateReservation(); createReservationControl.Update_Reservation(); Content = createReservationControl; }
private void btnUpdate_Click(object sender, RoutedEventArgs e) { var selected = schedule.SelectedAppointment; var index = schedule.Appointments.IndexOf(schedule.Appointments.First(a => a.Subject.Equals(selected.Subject) && a.Location.Equals(selected.Location) && a.StartTime.Equals(selected.StartTime) && a.EndTime.Equals(selected.EndTime))); CreateReservation createReservationControl = new CreateReservation(); EntityFactory.Term = terms[index]; EntityFactory.Reservation = EntityFactory.Term.reservation; createReservationControl.Update_Reservation(); Content = createReservationControl; }