Beispiel #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            FrmDetails frmDetails = new FrmDetails();

            frmDetails.Show();
            this.Hide();
        }
Beispiel #2
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {//add user details to each seat in Seats.Seatlist
            string row;
            string col;
            Regex  regRow = new Regex(@"[A-Z]");
            Regex  regCol = new Regex(@"\d+");

            if (User.Seat1 != "")
            {
                row = regRow.Match(User.Seat1).Value;
                col = regCol.Match(User.Seat1).Value;
                Seats.Book(row, col);
            }
            if (User.Seat2 != "")
            {
                row = regRow.Match(User.Seat2).Value;
                col = regCol.Match(User.Seat2).Value;
                Seats.Book(row, col);
            }
            if (User.Seat3 != "")
            {
                row = regRow.Match(User.Seat3).Value;
                col = regCol.Match(User.Seat3).Value;
                Seats.Book(row, col);
            }
            if (User.Seat4 != "")
            {
                row = regRow.Match(User.Seat4).Value;
                col = regCol.Match(User.Seat4).Value;
                Seats.Book(row, col);
            }

            //Add seats to table and reopen FrmDetails
            Seats.WriteSeatTable();
            MessageBox.Show("Your Booking has been confirmed", "Booking Confirmed", MessageBoxButtons.OK, MessageBoxIcon.Information);
            FrmDetails frmDetails = new FrmDetails();

            frmDetails.Show();
            this.Hide();
        }