public OrcamentoFilterViewModel getFilterModel()
        {
            var model = new OrcamentoFilterViewModel();

            model.DataEmissaoInicio = DateTime.Now.AddDays(-10);
            model.DataEmissaoFim    = DateTime.Now.AddDays(1);
            model.Status            = 1;
            model.listResultado     = getListaOrcamentos(model);
            return(model);
        }
        public OrcamentoFilterViewModel getOrcamentoFilterModel(bool?ehServico = null)
        {
            var model = new OrcamentoFilterViewModel();

            model.DataEmissaoInicio = DateTime.Now.AddDays(-10);
            model.DataEmissaoFim    = DateTime.Now;
            model.EhServico         = ehServico;
            model.listResultado     = getListaOrcamentos(model);
            return(model);
        }
        public List <OrcamentoViewModel> getListaOrcamentos(OrcamentoFilterViewModel filter)
        {
            var searchData = new OrcamentoSearchData()
            {
                Cliente           = filter.Cliente,
                DataEmissaoInicio = filter.DataEmissaoInicio,
                DataEmissaoFim    = filter.DataEmissaoFim,
                EhServico         = filter.EhServico,
                Status            = filter.Status
            };

            return(OrcamentoService.getOrcamentos(searchData).Select(c => LoadOrcamentoModel(c)).ToList());
        }
 public ActionResult Index(OrcamentoFilterViewModel model)
 {
     model.listResultado = getListaOrcamentos(model);
     return(View(model));
 }