コード例 #1
0
 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()));
     }
 }
コード例 #2
0
 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"));
     }
 }
コード例 #3
0
 public ActionResult Detalle(int id)
 {
     return(View(receta.Obtener(id)));
 }