예제 #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)
     {
     }
 }
예제 #2
0
 public static void Run(clsProducts prUsed)
 {
     frmUsed.Instance.SetDetails(prUsed);
 }
예제 #3
0
 public static void Run(clsProducts prNew)
 {
     frmNew.Instance.SetDetails(prNew);
 }
예제 #4
0
 internal async static Task <string> DeleteProductAsync(clsProducts prProductName)
 {
     return(await InsertOrUpdateAsync(prProductName, "http://localhost:60064/api/admin/DeleteProduct", "DELETE"));
 }
예제 #5
0
 internal async static Task <string> UpdateProductAsync(clsProducts prProducts)
 {
     return(await InsertOrUpdateAsync(prProducts, "http://localhost:60064/api/admin/PutProduct", "PUT"));
 }
예제 #6
0
 public void SetDetails(clsProducts prProducts)
 {
     _Products = prProducts;
     updateForm();
     ShowDialog();
 }
예제 #7
0
 public static void DispatchProductForm(clsProducts prProduct)
 {
     _ProductForm[prProduct.DVDType].DynamicInvoke(prProduct);
 }