コード例 #1
0
        protected void ddlPontoSebrae_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            var listaMissoes =
                new ManterMissao().ObterPorPontoSebrae(new Dominio.Classes.PontoSebrae {
                ID = int.Parse(ddlPontoSebrae.SelectedValue)
            });

            WebFormHelper.PreencherLista(listaMissoes.ToList(), ddlMissao, false, true);

            PreencherTabelas();
        }
コード例 #2
0
        private void PreencherComboMissao(PontoSebrae pontoSebrae)
        {
            var listaMissao = new ManterMissao().ObterPorPontoSebrae(pontoSebrae);

            if (listaMissao != null && listaMissao.Any())
            {
                WebFormHelper.PreencherLista(listaMissao, ddlMissao, false, true);
            }
            else
            {
                ddlTrilhaNivel.Items.Clear();
            }
        }
コード例 #3
0
        private void PreencherComboMissao(classes.PontoSebrae pontoSebrae)
        {
            var listaMissoes = new ManterMissao().ObterPorPontoSebrae(pontoSebrae);

            if (listaMissoes != null && listaMissoes.Any())
            {
                WebFormHelper.PreencherLista(listaMissoes, ddlMissao, true);
            }
            else
            {
                ddlPontoSebrae.Items.Clear();
            }
        }
コード例 #4
0
        protected void ddlPontoSebrae_SelectedIndexChanged(object sender, EventArgs e)
        {
            int idSelecionado;

            if (int.TryParse(ddlPontoSebrae.SelectedValue, out idSelecionado))
            {
                var missoes = new ManterMissao().ObterPorPontoSebrae(new PontoSebrae
                {
                    ID = idSelecionado
                }).OrderBy(x => x.Nome);

                WebFormHelper.PreencherLista(missoes, ddlMissao, false, true);
            }

            PreencherComboSolucaoSebrae();
        }
コード例 #5
0
        protected void btnPesquisar_Click(object sender, EventArgs e)
        {
            try
            {
                var missao = ObterObjetoMissao();
                IList <classes.Missao> listaMissao = new List <classes.Missao>();

                if (!string.IsNullOrEmpty(txtIdMissao.Text))
                {
                    var missaoPorId = new ManterMissao().ObterPorID(int.Parse(txtIdMissao.Text));
                    listaMissao.Add(missaoPorId);
                }
                else
                {
                    listaMissao = ObterMissaoPorTrilhas ? _manterMissao.ObterPorPontoSebraeTrilha(new Dominio.Classes.Trilha {
                        ID = int.Parse(txtTrilha.Text)
                    }).ToList() :
                                  _manterMissao.ObterMissaoPorFiltro(missao);
                }


                if (listaMissao != null && listaMissao.Any())
                {
                    WebFormHelper.PreencherGrid(listaMissao.ToList(), dgvMissao);
                    pnlMissao.Visible = true;
                }
                else
                {
                    pnlMissao.Visible = false;
                    WebFormHelper.ExibirMensagem(enumTipoMensagem.Alerta, "Nenhuma Informação Encontrada");
                }
            }
            catch (AcademicoException ex)
            {
                WebFormHelper.ExibirMensagem(enumTipoMensagem.Erro, ex.Message);
            }
        }
コード例 #6
0
 public ListarMissao()
 {
     _manterMissao = new ManterMissao();
 }