예제 #1
0
 private void btnaddsup_Click(object sender, EventArgs e)
 {
     if (txtShowSupplier.Text != "Supplier ID")
     {
         DialogResult result = MessageBox.Show("Are you sure you want cancel the transaction?",
                                               "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             db.sp_delete_Order(txtOrderID.Text);
             GenID(txtSupplierID);
             gbProduct_Details.Hide();
             gbSupplierDetails.Show();
             txtSupplierName.Clear();
             txtAddress.Clear();
             txtContact1.Clear();
             txtContact2.Clear();
             txtContactPerson.Clear();
             btnSave.Enabled = true;
             txtOrderBy.Text = Form1.UserID.ToString();
         }
     }
     else
     {
         gbProduct_Details.Hide();
         gbSupplierDetails.Show();
     }
 }