Exemplo n.º 1
0
        private void CreateBookingForm_Click(object sender, EventArgs e)
        {
            ReservationEditor editor = new ReservationEditor(this, _fileStorage, new Reservation());

            editor.Show();

            this.Hide();
        }
Exemplo n.º 2
0
        private void ViewButton_Click(object sender, EventArgs e)
        {
            int reservationId = Convert.ToInt32(ReservationsGrid.Rows[ReservationsGrid.SelectedRows[0].Index].Cells[0].Value.ToString());

            Reservation reservation = _fileStorage.Reservations.First(x => x.Id == reservationId);

            ReservationEditor editor = new ReservationEditor(this, _fileStorage, reservation);

            editor.Show();

            this.Hide();
        }