示例#1
0
 public ActionResult Edit([Bind(Include = "Id,Nome")] model.Cardapio cardapio)
 {
     if (ModelState.IsValid)
     {
         new data.Cardapio().Update(cardapio);
         return(Redirect(Request.UrlReferrer.AbsolutePath));
     }
     return(View(cardapio));
 }
示例#2
0
 public ActionResult ItemCreated([Bind(Include = "Id,Nome")] model.Cardapio cardapio)
 {
     if (ModelState.IsValid)
     {
         new biz.Cardapio().CriarCardapio(cardapio);
         return(Redirect(Request.UrlReferrer.AbsolutePath));
     }
     return(View(cardapio));
 }