Exemple #1
0
 public ActionResult AlterarTipoReembolso([Bind(Include = "tiporeembolsoid,nome")] TiposReembolso item)
 {
     if (ModelState.IsValid)
     {
         Boolean result = repository.AlterarTipoReembolso(item);
         return(RedirectToAction("ListaTiposReembolso"));
     }
     return(View(item));
 }
Exemple #2
0
        // 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));
        }
Exemple #3
0
        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));
        }