Ejemplo n.º 1
0
 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" }));
 }
Ejemplo n.º 2
0
        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" }));
        }