protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { HttpCookie filtroCookie = Request.Cookies["activeFiltroGroup"]; if (filtroCookie != null) { Filtros.CssClass = "panel-collapse collapse in"; } return; } using (var bm = new BMProcesso()) { WebFormHelper.PreencherLista(bm.ObterTodos().OrderBy(x => x.Nome).ToList(), cbxProcesso, true, false); } var listaStatusResposta = ((IEnumerable <enumStatusProcessoResposta>)Enum.GetValues(typeof(enumStatusProcessoResposta))).Select(c => new { ID = (int)c, Nome = c.GetDescription() }).ToList(); WebFormHelper.PreencherListaCustomizado(listaStatusResposta, cbxStatus, "ID", "Nome", true, false); var listaUnidades = new ManterUsuario().ObterTodosIQueryable() .Select(x => x.Unidade) .Distinct() .ToList() .Select(nomeUnidade => new { ID = nomeUnidade, Nome = nomeUnidade }) .Where(x => !string.IsNullOrWhiteSpace(x.Nome)) .OrderBy(y => y.Nome) .AsEnumerable(); listUnidades.PreencherItens(listaUnidades, "ID", "Nome"); if (!IsPostBack) { if (chkListaCamposVisiveis.Items.Count == 0) { PreencherCheckBoxPadrao(); } } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { HttpCookie filtroCookie = Request.Cookies["activeFiltroGroup"]; if (filtroCookie != null) { Filtros.CssClass = "panel-collapse collapse in"; } return; } var ufs = new ManterUf().ObterTodosUf(); ListBoxesUF.PreencherItens(ufs, "ID", "Nome"); using (var bm = new BMProcesso()) { WebFormHelper.PreencherLista(bm.ObterTodos(), cbxProcesso, true, false); } }
public IList <Processo> ObterTodosProcessos() { return(bmProcesso.ObterTodos()); }