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