예제 #1
0
 public JsonResult EliminarProducto(int id)
 {
     try
     {
         productoServicio.EliminarProducto(id);
         return(new JsonResult {
             Data = new { Success = true }
         });
     }
     catch (Exception ex)
     {
         return(new JsonResult {
             Data = new { Success = false, Data = "", Mensaje = ex.Message }
         });
     }
 }
예제 #2
0
 public ActionResult EliminarProducto(int Id)
 {
     ServicioProducto.EliminarProducto(Id);
     return(RedirectToAction("ListaDeProductos"));
 }