public ActionResult DeleteMeat(int id, MeatBEAN meatBEAN) //Pulls the method, from the Product DAO, for editing meat { try { Meat myMeat = _productService.GetMeat(id); _productService.DeleteMeat(myMeat); } catch { } return(RedirectToAction("Meats", new { controller = "Product" })); }
public ActionResult EditMeat(int id, MeatBEAN meatBEAN) //Pulls the method, from the Product DAO, for editing meat { try { Meat myMeat = new Meat { MeatId = meatBEAN.MeatId, Name = meatBEAN.Name }; _productService.EditMeat(myMeat); } catch { } return(RedirectToAction("Meats", new { controller = "Product" })); }