public ActionResult CreateProduct(Product p, AllProductsModel allProductsModel)
 {
     NorthwindSvr.InsertProduct(p, true);
     TempData["id"] = p.ProductID;
     allProductsModel.Products.Insert(allProductsModel.Products.Count, p);
     return RedirectToAction("DetailsProduct");
 }
 public void UpdateProduct(Product currentProduct, bool commit)
 {
     PersistSvr<Product>.Update(currentProduct, commit);
 }
 public ActionResult EditProduct(Product p, SuppliersCategoriesModel suppliersCategoriesModel)
 {
     NorthwindSvr.UpdateProduct(p, true);
     ViewBag.SuppliersCategoriesModel = suppliersCategoriesModel;
     return View(p); 
 }
 public void InsertProduct(Product product, bool commit)
 {
     PersistSvr<Product>.Insert(product, commit);
 }