private void CarregarCombos(RelStatusVendaViewModel model) { List <Object> listaSimNao = new List <Object> { new { value = 1, text = "Sim" }, new { value = 2, text = "Não" } }; model.ListaIncorporador = new SelectList(incorporadorAppService.ListarTodos().OrderBy(l => l.RazaoSocial), "Id", "RazaoSocial", model.Filtro.IncorporadorId); model.ListaEmpreendimento = new SelectList(empreendimentoAppService.ListarPeloIncorporadorAssociado(model.Filtro.IncorporadorId), "Id", "Nome", model.Filtro.EmpreendimentoId); model.ListaBloco = new SelectList(blocoAppService.ListarPeloEmpreendimento(model.Filtro.EmpreendimentoId), "Id", "Nome", model.Filtro.BlocoId); model.ListaSimNao = new SelectList(listaSimNao, "value", "text", model.Filtro.Aprovado); }
public ActionResult Index() { var model = new RelStatusVendaViewModel(); model.Filtro.PaginationParameters.PageSize = this.DefaultPageSize; model.Filtro.PaginationParameters.UniqueIdentifier = GenerateUniqueIdentifier(); model.PodeImprimir = vendaAppService.EhPermitidoImprimirRelStatusVenda(); CarregarCombos(model); return(View(model)); }
public ActionResult Lista(RelStatusVendaViewModel model) { if (ModelState.IsValid) { Session["Filtro"] = model; int totalRegistros; if (string.IsNullOrEmpty(model.Filtro.PaginationParameters.OrderBy)) { model.Filtro.PaginationParameters.OrderBy = "incorporador"; } var result = vendaAppService.ListarPeloFiltroRelStatusVenda(model.Filtro, out totalRegistros); if (result.Any()) { var listaViewModel = CreateListaViewModel(model.Filtro.PaginationParameters, totalRegistros, result); return(PartialView("ListaPartial", listaViewModel)); } return(PartialView("_EmptyListPartial")); } return(PartialView("_NotificationMessagesPartial")); }