Example #1
0
        public ActionResult Atualiza(int id)
        {
            var     dao     = new LicencaDAO();
            Licenca licenca = dao.BuscaPorId(id);

            return(View(licenca));
        }
Example #2
0
        public ActionResult Alterar(int id)
        {
            var     dao     = new LicencaDAO();
            Licenca licenca = dao.BuscaPorId(id);

            ViewBag.Licenca = licenca;
            return(View(licenca));
        }
Example #3
0
        public ActionResult DecrementaQtd(int id)
        {
            LicencaDAO dao     = new LicencaDAO();
            Licenca    licenca = dao.BuscaPorId(id);

            licenca.Quantidade--;
            dao.Atualiza(licenca);
            return(Json(licenca));
        }