Beispiel #1
0
        protected void btnPesquisar_Click(object sender, EventArgs e)
        {
            using (var mdse = new RelatorioMetaDesenvolvimentoSE())
            {
                var lstGrid = mdse.ConsultarMetaDesenvolvimentoSe(
                    string.IsNullOrWhiteSpace(cbxNivelOcupacional.SelectedValue)
                        ? 0
                        : int.Parse(cbxNivelOcupacional.SelectedValue),
                    string.IsNullOrWhiteSpace(cbxUF.SelectedValue) ? 0 : int.Parse(cbxUF.SelectedValue),
                    string.IsNullOrWhiteSpace(cbxCategoriaSE.SelectedValue)
                        ? 0
                        : int.Parse(cbxCategoriaSE.SelectedValue));

                Session.Add("dsRelatorio", lstGrid);

                if (lstGrid != null && lstGrid.Count > 0)
                {
                    componenteGeracaoRelatorio.Visible = true;
                    ucFormatoSaidaRelatorio.Visible    = true;
                    btnPesquisar.CssClass = "btn btn-default mostrarload";
                    Filtros.CssClass      = "panel-collapse collapse";
                }
                else
                {
                    componenteGeracaoRelatorio.Visible = false;
                    ucFormatoSaidaRelatorio.Visible    = false;
                }

                dgRelatorio.DataSource = lstGrid;
                WebFormHelper.ValidarVisibilidadeCamposGrid(dgRelatorio, chkListaCamposVisiveis.Items);
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }

            using (var mdse = new RelatorioMetaDesenvolvimentoSE())
            {
                WebFormHelper.PreencherLista(mdse.ObterNivelOcupacionalTodos(), cbxNivelOcupacional, true);
                WebFormHelper.PreencherLista(mdse.ObterUfTodos(), cbxUF, true);
                WebFormHelper.PreencherLista(mdse.ObterCategoriaConteudoTodos(), cbxCategoriaSE, true);
            }
        }