public ActionResult DeleteConfirmed(int id) { CustoFolha custoFolha = db.CustoFolhas.Find(id); db.CustoFolhas.Remove(custoFolha); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CustoFolhaId,Data,Salario,Ferias,DecimoTerceiro,Plr,Fgts,Inss,DespAgencia,ConvMedico,VAlimentacao,VTransporte,AreaId")] CustoFolha custoFolha) { if (ModelState.IsValid) { db.Entry(custoFolha).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AreaId = new SelectList(db.Areas, "AreaId", "Apelido", custoFolha.AreaId); return(View(custoFolha)); }
// GET: CustoFolhas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CustoFolha custoFolha = db.CustoFolhas.Include(c => c.Area).SingleOrDefault(c => c.CustoFolhaId == id); if (custoFolha == null) { return(HttpNotFound()); } return(View(custoFolha)); }
// GET: CustoFolhas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CustoFolha custoFolha = db.CustoFolhas.Find(id); if (custoFolha == null) { return(HttpNotFound()); } ViewBag.AreaId = new SelectList(db.Areas, "AreaId", "Apelido", custoFolha.AreaId); return(View(custoFolha)); }
public ActionResult DeleteConfirmed(int id) { CustoFolha custoFolha = db.CustoFolhas.Find(id); return(View("Erase", custoFolha)); }