示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     p_fname  = fname.Text;
     p_lname  = lname.Text;
     p_cnic   = cnic.Text;
     p_mobile = mobile.Text;
     check_user();
     if (dt_check.Rows.Count > 0)
     {
         ticket();
         if (no > 0)
         {
             DialogResult dr = MessageBox.Show("Train booked! view ticket information now.", "Message", MessageBoxButtons.OK);
             if (dr == DialogResult.OK)
             {
                 passenger_login p_t = new passenger_login();
                 p_t.Show();
             }
         }
         else
         {
             MessageBox.Show("There is some error booking the train.");
         }
     }
     else
     {
         passenger();
         ticket();
         if (no > 0)
         {
             DialogResult dr = MessageBox.Show("Train booked! view ticket information now.", "Message", MessageBoxButtons.OK);
             if (dr == DialogResult.OK)
             {
                 passenger_login p_t = new passenger_login();
                 p_t.Show();
             }
         }
         else
         {
             MessageBox.Show("There is some error booking the train.");
         }
     }
 }
示例#2
0
        private void button3_Click(object sender, EventArgs e)
        {
            passenger_login p_l = new passenger_login();

            p_l.Show();
        }