public ActionResult Delete(int id, BusinessLogicLayer.ProductBLL collection) { try { using (ContextBll ctx = new ContextBll()) { ctx.DeleteProduct(id); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public ActionResult Edit(int id, BusinessLogicLayer.ProductBLL collection) { try { // TODO: Add insert logic here using (ContextBll ctx = new ContextBll()) { ctx.UpdateProduct(collection); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public void DeleteProduct(ProductBLL Product) { _context.DeleteProduct(Product.ProductsID); }
public void UpdateProduct(ProductBLL product) { _context.UpdateProduct(product.ProductsID, product.CategoryID, product.SellerID, product.Name, product.Descrption, product.ReservePrice, product.WinningofferID, product.Comments, product.Photos, product.Categories, product.SellerEmail, product.SellerName); }