public ActionResult AlterarTipoReembolso([Bind(Include = "tiporeembolsoid,nome")] TiposReembolso item) { if (ModelState.IsValid) { Boolean result = repository.AlterarTipoReembolso(item); return(RedirectToAction("ListaTiposReembolso")); } return(View(item)); }
// GET: Reembolsoes1/Edit/5 public ActionResult AlterarTipoReembolso(int id) { TiposReembolso item = repository.GetTipoReembolso(id); if (ModelState.IsValid) { if (item == null) { return(HttpNotFound()); } return(View(item)); } return(View(item)); }
public ActionResult NovoTipoReembolso([Bind(Include = "tiporeembolsoid,nome")] TiposReembolso item) { if (ModelState.IsValid) { if (repository.TipoReembolsoJaExiste(item.nome)) { ViewBag.jaexiste = item.nome + " já esta cadastrada!"; return(View(item)); } var result = repository.NovoTipoReembolso(item); return(RedirectToAction("ListaTiposReembolso")); } return(View(item)); }