public ActionResult DeleteConfirmed(int id) { menuReport menuReport = mrr.Get(id); mrr.Delete(menuReport); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { menuReport menureport = db.menuReport.Find(id); db.menuReport.Remove(menureport); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /MenuReport/Details/5 public ActionResult Details(int id = 0) { menuReport menureport = db.menuReport.Find(id); if (menureport == null) { return(HttpNotFound()); } return(View(menureport)); }
public ActionResult Delete(int id = 0) { ViewBag.Message = "Remover menu"; menuReport menuReport = mrr.Get(id); if (menuReport == null) { return(HttpNotFound()); } return(View(menuReport)); }
public ActionResult Details(int id = 0) { ViewBag.Message = "Detalhes do Relatório"; menuReport menuReport = mrr.Get(id); if (menuReport == null) { return(HttpNotFound()); } return(View(menuReport)); }
public ActionResult Edit(menuReport menureport) { if (ModelState.IsValid) { db.Entry(menureport).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MenuRefId = new SelectList(db.menu, "Id", "Name", menureport.MenuRefId); return(View(menureport)); }
// // GET: /MenuReport/Edit/5 public ActionResult Edit(int id = 0) { menuReport menureport = db.menuReport.Find(id); if (menureport == null) { return(HttpNotFound()); } ViewBag.MenuRefId = new SelectList(db.menu, "Id", "Name", menureport.MenuRefId); return(View(menureport)); }
public ActionResult Edit(menuReport menuReport) { try { mrr.Update(menuReport); return(RedirectToAction("Index")); } catch (Exception) { return(View(menuReport)); } }
public ActionResult Create(menuReport menuReport) { try { mrr.Save(menuReport); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(menuReport menureport) { if (ModelState.IsValid) { db.menuReport.Add(menureport); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MenuRefId = new SelectList(db.menu, "Id", "Name", menureport.MenuRefId); return(View(menureport)); }
public ActionResult Edit(int id = 0) { ViewBag.Message = "Editar Menu"; IList <menu> ilm = mr.GetAll().ToList(); ViewBag.menuref = ilm; menuReport menuReport = mrr.Get(id); if (menuReport == null) { return(HttpNotFound()); } return(View(menuReport)); }