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");
 }
Пример #2
0
 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); 
 }
Пример #4
0
 public void InsertProduct(Product product, bool commit)
 {
     PersistSvr<Product>.Insert(product, commit);
 }