コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked || radioButton2.Checked || radioButton3.Checked || radioButton4.Checked || radioButton5.Checked || radioButton6.Checked || radioButton7.Checked || radioButton8.Checked || radioButton9.Checked || radioButton10.Checked || radioButton11.Checked || radioButton12.Checked || radioButton13.Checked || radioButton14.Checked || radioButton15.Checked || radioButton16.Checked || radioButton17.Checked || radioButton18.Checked || radioButton19.Checked || radioButton20.Checked || radioButton21.Checked || radioButton22.Checked || radioButton23.Checked || radioButton24.Checked || radioButton25.Checked || radioButton26.Checked || radioButton27.Checked || radioButton28.Checked || radioButton29.Checked || radioButton30.Checked || radioButton31.Checked || radioButton32.Checked || radioButton33.Checked || radioButton34.Checked || radioButton35.Checked)
     {
         if (type == 0)
         {
             ReturnAvailability rtn = new ReturnAvailability(UserId, Departure, Return, dt, dtReturn, Cabin);
             rtn.ShowDialog();
         }
         else
         {
             if (Cabin == "Economy")
             {
                 Seat st = new Seat();
                 st.ShowDialog();
             }
             else
             {
                 BusinessSeat bs = new BusinessSeat();
                 bs.ShowDialog();
             }
         }
     }
     else
     {
         MessageBox.Show("Please Select Departure Time and CLock", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked || radioButton2.Checked || radioButton3.Checked || radioButton4.Checked || radioButton5.Checked || radioButton6.Checked || radioButton7.Checked || radioButton8.Checked || radioButton9.Checked || radioButton10.Checked || radioButton11.Checked || radioButton12.Checked || radioButton13.Checked || radioButton14.Checked || radioButton15.Checked || radioButton16.Checked || radioButton17.Checked || radioButton18.Checked || radioButton19.Checked || radioButton20.Checked || radioButton21.Checked || radioButton22.Checked || radioButton23.Checked || radioButton24.Checked || radioButton25.Checked || radioButton26.Checked || radioButton27.Checked || radioButton28.Checked || radioButton29.Checked || radioButton30.Checked || radioButton31.Checked || radioButton32.Checked || radioButton33.Checked || radioButton34.Checked || radioButton35.Checked)
     {
         if (Cabin == "Economy")
         {
             //Form show
             Seat st = new Seat(UserId, Departure, Return, Adult, Cabin, dt, Returndt, Money, Money2);
             st.ShowDialog();
         }
         else
         {
             //Form show
             BusinessSeat bs = new BusinessSeat(UserId, Departure, Return, Adult, Cabin, dt, Returndt, Money, Money2);
             bs.ShowDialog();
         }
     }
     else
     {
         MessageBox.Show("Please Select Return Time and CLock", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }