Пример #1
0
 private void btnChoose_Click(object sender, EventArgs e)
 {
     //Next form
     if (control)
     {
         this.numTicket = (int)numericTicket.Value;
         fInputInfor fInputInfor = new fInputInfor(this.idTrip, this.idUser, this.numTicket);
         this.Hide();
         fInputInfor.ShowDialog();
         this.control = false;
         this.Show();
     }
 }
Пример #2
0
        private void btnChoose_Click(object sender, EventArgs e)
        {
            //Next form
            if (control)
            {
                this.numTicket = (int)numericTicket.Value;
                Trip trip = TicketDAO.Instance.loadTrip(this.idTrip);

                if (this.numTicket > trip.AvailableSeat)
                {
                    MessageBox.Show("SORRY!! There is no enough ticket in this trip!.");
                    return;
                }
                fInputInfor fInputInfor = new fInputInfor(this.idTrip, this.idUser, this.numTicket);
                this.Hide();
                fInputInfor.ShowDialog();
                this.control = false;
                this.Show();
            }
        }