private void btnAccept_Click(object sender, EventArgs e)
 {
     if (addProductSupplier)
     {
         productSupplier = new Products_Suppliers();
         this.PutProductSupplierData(productSupplier);
         try
         {
             productSupplier.ProductSupplierId = Products_SuppliersDB.AddProductSupplier(productSupplier);
             this.DialogResult = DialogResult.OK;
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, ex.GetType().ToString());
         }
     }
     else
     {
         Products_Suppliers newProductSupplier = new Products_Suppliers();
         newProductSupplier.ProductSupplierId = productSupplier.ProductSupplierId;
         this.PutProductSupplierData(newProductSupplier);
         try
         {
             if (!Products_SuppliersDB.UpdateProductSupplier(productSupplier, newProductSupplier))
             {
                 MessageBox.Show("Another user has updated or " +
                                 "deleted that product supplier.", "Database Error");
                 this.DialogResult = DialogResult.Retry;
             }
             else
             {
                 productSupplier   = newProductSupplier;
                 this.DialogResult = DialogResult.OK;
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, ex.GetType().ToString());
         }
     }
 }