Example #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         clsProducts lcProduct = clsProducts.NewProduct(cboChoice.SelectedItem.ToString());
         if (lcProduct != null)
         {
             lcProduct.Category = _Category.CategoryName;
             frmProduct.DispatchProductForm(lcProduct);
             if (!string.IsNullOrEmpty(lcProduct.DVDName))
             {
                 refreshFormFromDB(_Category.CategoryName);
             }
         }
     }
     catch (Exception)
     {
     }
 }
Example #2
0
 public static void Run(clsProducts prUsed)
 {
     frmUsed.Instance.SetDetails(prUsed);
 }
Example #3
0
 public static void Run(clsProducts prNew)
 {
     frmNew.Instance.SetDetails(prNew);
 }
Example #4
0
 internal async static Task <string> DeleteProductAsync(clsProducts prProductName)
 {
     return(await InsertOrUpdateAsync(prProductName, "http://localhost:60064/api/admin/DeleteProduct", "DELETE"));
 }
Example #5
0
 internal async static Task <string> UpdateProductAsync(clsProducts prProducts)
 {
     return(await InsertOrUpdateAsync(prProducts, "http://localhost:60064/api/admin/PutProduct", "PUT"));
 }
Example #6
0
 public void SetDetails(clsProducts prProducts)
 {
     _Products = prProducts;
     updateForm();
     ShowDialog();
 }
Example #7
0
 public static void DispatchProductForm(clsProducts prProduct)
 {
     _ProductForm[prProduct.DVDType].DynamicInvoke(prProduct);
 }