コード例 #1
0
 private void btnNext_Click(object sender, EventArgs e)
 {
     if (cmbPaymentMethods.SelectedIndex == -1 || cmbPaymentOption.SelectedIndex == -1)
     {
         MessageBox.Show("Make sure that you have selected the payment option and method", "Invalid Selection", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         if (cmbPaymentOption.SelectedItem.ToString() == "Deposit")
         {
             checkDepositStatus(txtBookingNo.Text);
         }
         else
         {
             DBConnect pay     = new DBConnect();
             bool      success = pay.updateChargeTotal(txtBookingNo.Text);
             if (success == true)
             {
                 SelectBooking(txtBookingNo.Text);
             }
             else
             {
                 MessageBox.Show("Connection is faild try again please", "Invalid Connection", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }