public ActionResult DeleteConfirmed(int id) { FolhaPagamentoModel folhapagamentomodel = db.FolhaPagamentoModels.Find(id); db.FolhaPagamentoModels.Remove(folhapagamentomodel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(FolhaPagamentoModel folhapagamentomodel) { if (ModelState.IsValid) { db.Entry(folhapagamentomodel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(folhapagamentomodel)); }
// // GET: /FolhaPagamento/Edit/5 public ActionResult Edit(int id = 0) { FolhaPagamentoModel folhapagamentomodel = db.FolhaPagamentoModels.Find(id); if (folhapagamentomodel == null) { return(HttpNotFound()); } return(View(folhapagamentomodel)); }
public ActionResult Create(FolhaPagamentoModel folhapagamentomodel) { if (ModelState.IsValid) { db.FolhaPagamentoModels.Add(folhapagamentomodel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(folhapagamentomodel)); }