protected void Page_Load(object sender, EventArgs e) { // Variável para impedir execuções desecessárias da busca de SEs com filtro de categoria. ViewState["buscouCategorias"] = true; if (IsPostBack) { return; } ViewState["_SE"] = null; var manterUsuario = new ManterUsuario(); using (var relDa = new RelatorioDesempenhoAcademico()) { AtualizarComboSolucaoEducacional(null, null); if (ucNacionalizarRelatorio.IsNacionalizado) { ucCategorias1.PreencherCategorias(false, null, null, true); } else { ucCategorias1.PreencherTodasCategorias(false, null); } ListBoxesStatus.PreencherItens(relDa.ObterStatusMatriculaTodos(), "ID", "Nome"); ListBoxesNivelOcupacional.PreencherItens(relDa.GetNivelOcupacionalTodos(), "ID", "Nome"); ListBoxesUF.PreencherItens(relDa.ObterUFTodos(), "ID", "Nome"); ListBoxesUFResponsavel.PreencherItens(relDa.ObterUFTodos(), "ID", "Nome"); ListBoxesPublicoAlvo.PreencherItens(relDa.ObterPublicoAlvoTodos(), "ID", "Nome", true); ListBoxesFormaDeAquisicao.PreencherItens(relDa.ObterFormaDeAquisicaoTodos(), "ID", "Nome"); } }
protected void PreencherCombos(object sender, EventArgs e) { using (var rel = new RelatorioQuestionario()) { ViewState["_Demandas"] = Helpers.Util.ObterListaAutocomplete(rel.ListaProcessos()); switch (ObterTipoRelatorioSelecionado()) { case enumTipoRelatorioResposta.Respondente: case enumTipoRelatorioResposta.Estatistico: PreencherComboQuestionario(); ListBoxesStatus.PreencherItens(rel.ListaStatus(), "ID", "Nome"); if (ObterTipoRelatorioSelecionado() == enumTipoRelatorioResposta.Estatistico) { // Relatório estatístico sempre será de pesquisa. ddlTipoQuestionario.SelectedValue = ((int)enumTipoQuestionario.Pesquisa).ToString(); } else { WebFormHelper.PreencherLista(new ManterTipoQuestionario().ObterTodos().OrderBy(x => x.Nome).ToList(), ddlTipoQuestionario, true); } txtQuestionario.Text = ""; LimparCampos(); break; case enumTipoRelatorioResposta.Consolidado: var listaSe = rel.ListaSolucaoEducacionalPorCategorias(ucCategorias1.IdsCategoriasMarcadas); ViewState["_SE"] = Helpers.Util.ObterListaAutocomplete(listaSe); txtSolucaoEducacional.Text = ""; LimparCampos(); break; default: throw new ArgumentOutOfRangeException(); } } }