public ActionResult AgregarReceta(int id = 0) { if (id == 0 || receta.Obtener(id) == null) { return(Redirect(Request.UrlReferrer.AbsolutePath)); } else { ViewBag.comboDietas = dieta.listar(SessionHelper.Leer <int>("id_usuario")); ViewBag.receta = receta.Obtener(id); return(View(new dieta_receta())); } }
public ActionResult Receta(int id = 0) { if (id > 0) { if (receta.Obtener(id) != null) { return(View(receta.Obtener(id))); } else { return(Redirect("~/Home/Index/1")); } } else { return(Redirect("~/Home/Index/1")); } }
public ActionResult Detalle(int id) { return(View(receta.Obtener(id))); }