public IActionResult ExcluirPlanoConta(int id) { PlanoDeConta plano = new PlanoDeConta(HttpContextAccessor); plano.ExcluirPlanoConta(id); return(RedirectToAction("ListaPlanoConta")); }
public IActionResult ListaPlanoConta() { PlanoDeConta planoDeConta = new PlanoDeConta(HttpContextAccessor); ViewBag.ListaPlanoContas = planoDeConta.ListaPlanoContas(); return(View()); }
public ActionResult NovoPlanoDeContas(int?id) { if (id != null) { PlanoDeConta planoDeConta = new PlanoDeConta(HttpContextAccessor); ViewBag.Registro = planoDeConta.BuscarPorId(id); } return(View()); }
private bool PlanoDeContaValido(PlanoDeConta planoDeConta) { if (planoDeConta.EhValido()) { return(true); } NotificarValidacoesErro(planoDeConta.ValidationResult); return(false); }
public IActionResult NovoPlanoDeContas(PlanoDeConta planoDeConta) { if (ModelState.IsValid) { planoDeConta.HttpContextAccessor = HttpContextAccessor; planoDeConta.CriarPlanoConta(); return(RedirectToAction("ListaPlanoConta")); } return(View()); }