public ActionResult Index(AgendamentoViewModel agendamentoVM) { agendamentoVM.isValid = true; // ModelState.IsValidField("NovoAgendamento"); agendamentoVM.HandleRequest(); if (ModelState.IsValid) { ModelState.Clear(); } if (Request.IsAjaxRequest()) { if (agendamentoVM.IsAgendamentoMode) { return(PartialView("_NovoAgendamento", agendamentoVM)); } return(PartialView("_ListaAgendamentos", agendamentoVM)); } return(View(agendamentoVM)); }
public ActionResult Index() { AgendamentoViewModel agendamentoVM = new AgendamentoViewModel(); agendamentoVM.HandleRequest(); return(View(agendamentoVM)); }