예제 #1
0
 public ActionResult Editar([Bind(Include = "regionalid,descricao,dataabertura,datainclusao")] regional regional)
 {
     if (ModelState.IsValid)
     {
         //Campo atribuído automaticamente
         regional.dataalteracao = DateTime.Now;
         var servico = new BaseService<regional>();
         servico.Alterar(regional);
         servico.Salvar();
         return RedirectToAction("Index");
     }
     return View(regional);
 }
예제 #2
0
 public ActionResult Editar([Bind(Include = "federacaoid,datainclusao,descricao")] federacao federacao)
 {
     if (ModelState.IsValid)
     {
         //Campo atribuído automaticamente
         federacao.dataalteracao = DateTime.Now;
         var servico = new BaseService<federacao>();
         servico.Alterar(federacao);
         servico.Salvar();
         return RedirectToAction("Index");
     }
     return View(federacao);
 }
예제 #3
0
 public ActionResult Editar([Bind(Include = "adeptoid,nome,datanascimento,email,telefoneresidencial,telefonecomercial,telefonecelular,dataprimeiravez,datainclusao")] adepto adepto)
 {
     if (ModelState.IsValid)
     {
         //Campo atribuído automaticamente
         adepto.dataalteracao = DateTime.Now;
         var servico = new BaseService<adepto>();
         servico.Alterar(adepto);
         servico.Salvar();
         return RedirectToAction("Index");
     }
     return View(adepto);
 }
예제 #4
0
 public ActionResult Editar([Bind(Include = "associacaoid, descricao, dataabertura, datainclusao, regionalid, federacaoid")] associacao associacao)
 {
     if (ModelState.IsValid)
     {
         //Campo atribuído automaticamente
         associacao.dataalteracao = DateTime.Now;
         var servico = new BaseService<associacao>();
         servico.Alterar(associacao);
         servico.Salvar();
         return RedirectToAction("Index");
     }
     CriarViewBags();
     return View(associacao);
 }