예제 #1
0
 private void btnInsertCustomer_Click(object sender, EventArgs e)
 {
     if (txtName.Text.ToString().Equals("") && txtAddress.Text.ToString().Equals("") && txtPhone.Text.ToString().Equals("") && txtCountry.Text.ToString().Equals(""))
     {
         MessageBox.Show("Fill all values ");
     }
     else
     {
         customer = new CustomerPannel(1, txtName.Text, txtAddress.Text, txtPhone.Text, txtCountry.Text);
         // pass the record to insert
         customer.AddCustomer();
         MessageBox.Show("Customer Record is stored ");
     }
     txtCustomerID.Text = "";
     txtName.Text       = "";
     txtPhone.Text      = "";
     txtAddress.Text    = "";
     txtCountry.Text    = "";
 }
예제 #2
0
 private void btnDeleteCustomer_Click(object sender, EventArgs e)
 {
     if (txtMovieID.Text.ToString().Equals(""))
     {
         MessageBox.Show("You must have to select the ID ");
     }
     else
     {
         //
         customer = new CustomerPannel(Convert.ToInt32(txtMovieID.Text), txtName.Text, txtAddress.Text, txtPhone.Text, txtCountry.Text);
         // pass the record to insert
         customer.DeleteCustomer();
         MessageBox.Show("Customer Record is Deleted  ");
     }
     txtCustomerID.Text = "";
     txtName.Text       = "";
     txtPhone.Text      = "";
     txtAddress.Text    = "";
     txtCountry.Text    = "";
 }