private void BtnEdit_Click(object sender, RoutedEventArgs e) { Seat seat = DGSeat.SelectedItem as Seat; if (SelectedSeat(seat)) { Seat oldSeat = seat.Clone() as Seat; EditSeatWindow esw = new EditSeatWindow(seat, EditSeatWindow.Option.EDIT); if (esw.ShowDialog() != true) { int index = IndexOfSelectedSeat(oldSeat.SeatLabel); Data.Instance.SeatAvailable[index] = oldSeat; } } view.Refresh(); }
private void BtnAdd_Click(object sender, RoutedEventArgs e) { EditSeatWindow esw = new EditSeatWindow(new Seat(), EditSeatWindow.Option.ADD); esw.ShowDialog(); }