Пример #1
0
        protected void cbxFormaAquisicao_SelectedIndexChanged(object sender, EventArgs e)
        {
            using (var relSeo = new RelatorioSolucaoEducacionalOferta())
            {
                var idForma = string.IsNullOrWhiteSpace(cbxFormaAquisicao.SelectedValue)
                    ? 0
                    : int.Parse(cbxFormaAquisicao.SelectedValue);

                var lista = relSeo.ObterSolucaoEducacionalPorFormaAquisicao(null, idForma);

                ViewState["_SE"] = Helpers.Util.ObterListaAutocomplete(lista);
            }
        }
Пример #2
0
        protected void cbxFormaAquisicao_SelectedIndexChanged(object sender, EventArgs e)
        {
            using (RelatorioSolucaoEducacionalOferta relSEO = new RelatorioSolucaoEducacionalOferta())
            {
                int idForma     = string.IsNullOrWhiteSpace(cbxFormaAquisicao.SelectedValue) ? 0 : int.Parse(cbxFormaAquisicao.SelectedValue);
                int ufPermitida = new BMUsuario().ObterUFLogadoSeGestor();
                var lista       = relSEO.ObterSolucaoEducacionalPorFormaAquisicao(idForma);
                if (ufPermitida > 0)
                {
                    lista = lista.Where(x => x.ListaPermissao.Any(p => p.Uf != null || p.Uf.ID == ufPermitida)).ToList();
                }

                WebFormHelper.PreencherLista(lista, cbxSolucaoEducacional, true, false);
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }

            using (var relSeo = new RelatorioSolucaoEducacionalOferta())
            {
                WebFormHelper.PreencherLista(relSeo.ObterTipoOfertaTodos(), cbxTipoOferta, true);
                WebFormHelper.PreencherLista(relSeo.ObterFormaAquisicaoTodos(), cbxFormaAquisicao, true);

                var lista = relSeo.ObterSolucaoEducacionalPorFormaAquisicao();

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

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

            //Task #416 - revisão de regras de visualização das UFs
            var ufs = new ManterUf().ObterTodosUf();

            WebFormHelper.PreencherLista(ufs, cbxUF);
        }