예제 #1
0
        public ActionResult ViewEditar(int id)
        {
            ConvenioDAO dao = new ConvenioDAO();

            ViewBag.Convenio = dao.BuscaPorId(id);

            return(View());
        }
예제 #2
0
        public ActionResult Remover(int id)
        {
            ConvenioDAO dao      = new ConvenioDAO();
            Convenio    convenio = dao.BuscaPorId(id);

            dao.Remover(convenio);

            return(RedirectToAction("Index", "Convenio"));
        }
예제 #3
0
        public ActionResult Editar(int id, Convenio convenio)
        {
            ConvenioDAO dao = new ConvenioDAO();

            Convenio conv = dao.BuscaPorId(id);

            conv.ConvenioNome = convenio.ConvenioNome;


            dao.Atualiza(conv);
            return(RedirectToAction("Index", "Convenio"));
        }