protected void cbxFormaAquisicao_SelectedIndexChanged(object sender, EventArgs e) { using (var bp = new RelatorioHorasCapacitacao()) { var idFormaAquisicao = string.IsNullOrWhiteSpace(cbxFormaAquisicao.SelectedItem.Value) ? 0 : int.Parse(cbxFormaAquisicao.SelectedItem.Value); var usuarioLogado = new ManterUsuario().ObterUsuarioLogado(); var lista = bp.ObterSolucaoEducacionalPorFormaAquisicao( idFormaAquisicao); ViewState["_SE"] = Helpers.Util.ObterListaAutocomplete(lista); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } using (var bp = new RelatorioHorasCapacitacao()) { 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); ListBoxesUFResponsavel.PreencherItens(bp.ObterUFTodos(), "ID", "Nome"); ViewState["_SE"] = Helpers.Util.ObterListaAutocomplete(bp.ObterSolucaoEducacionalPorFormaAquisicao()); } }