예제 #1
0
 private void btnEditBooking_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtBookingId.Text != "")
         {
             BookingView previusForm = new BookingView(Int32.Parse(txtBookingId.Text), true);
             this.Hide();
             previusForm.ShowDialog();
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtCustomerId.Text != "" || txtCustomerId.GetType() == typeof(int))
         {
             BookingView nextForm = new BookingView(Convert.ToInt32(txtCustomerId.Text));
             this.Hide();
             nextForm.ShowDialog();
             this.Close();
         }
         else
         {
             lblMessage2.Text = "Select the customer Id from Table";
         }
     }
     catch (Exception ex)
     {
         lblMessage2.Text = ex.Message;
     }
 }