コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }

            using (var bp = new RelatorioCapacitados())
            {
                WebFormHelper.PreencherLista(bp.ObterPerfilTodos(), cbxPerfil, true);
                WebFormHelper.PreencherLista(bp.ObterUFTodos(), cbxUf, true);
                WebFormHelper.PreencherLista(bp.ObterNivelOcupacionalTodos(), cbxNivelOcupacional, true);
                WebFormHelper.PreencherLista(bp.ObterFormaAquisicaoTodos(), cbxFormaAquisicao, true);
                WebFormHelper.PreencherLista(bp.ObterStatusMatriculaTodos(), cbxStatusMatricula, true);
                WebFormHelper.PreencherLista(
                    new ListItemCollection
                {
                    new ListItem("Todos", ""),
                    new ListItem("Ativo", "ativo"),
                    new ListItem("Inativo", "inativo")
                }, cbxSituacaoUsuario);

                ListBoxesUFResponsavel.PreencherItens(bp.ObterUFTodos(), "ID", "Nome");

                ViewState["_SE"] = Helpers.Util.ObterListaAutocomplete(bp.ObterSolucaoEducacionalPorFormaAquisicao());
            }
        }
コード例 #2
0
        protected void cbxFormaAquisicao_SelectedIndexChanged(object sender, EventArgs e)
        {
            using (var bp = new RelatorioCapacitados())
            {
                var idFormaAquisicao = string.IsNullOrWhiteSpace(cbxFormaAquisicao.SelectedItem.Value)
                    ? 0
                    : int.Parse(cbxFormaAquisicao.SelectedItem.Value);

                var lista = bp.ObterSolucaoEducacionalPorFormaAquisicao(idFormaAquisicao);

                ViewState["_SE"] = Helpers.Util.ObterListaAutocomplete(lista);
            }
        }