Ejemplo n.º 1
0
        /// <summary>
        /// Evento change do combo de UA Superior.
        /// </summary>
        private void UCFiltroEscolas1__Selecionar()
        {
            try
            {
                UCComboUAEscola1.CarregaEscolaPorUASuperiorSelecionada();

                if (UCComboUAEscola1.Uad_ID != Guid.Empty)
                {
                    UCComboUAEscola1.FocoEscolas          = true;
                    UCComboUAEscola1.PermiteAlterarCombos = true;
                }
                else
                {
                    UCComboCursoCurriculo1.Valor = new[] { -1, -1, -1 };
                    UCComboCursoCurriculo1.CarregarCursoCurriculo();
                }

                UCComboUAEscola1.SelectedValueEscolas = new[] { -1, -1 };
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Evento change do combo de UA Superior.
        /// </summary>
        private void UCComboUAEscola1_IndexChangedUA()
        {
            try
            {
                UCComboUAEscola1.FiltroEscolasControladas = true;
                UCComboUAEscola1.CarregaEscolaPorUASuperiorSelecionada();

                if (UCComboUAEscola1.Uad_ID != Guid.Empty)
                {
                    UCComboUAEscola1.FocoEscolas          = true;
                    UCComboUAEscola1.PermiteAlterarCombos = true;
                }

                UCComboUAEscola1.SelectedValueEscolas = new[] { -1, -1 };
                UCComboUAEscola1_IndexChangedUnidadeEscola();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Evento change do combo de UA Superior.
        /// </summary>
        private void UCFiltroEscolas1__Selecionar()
        {
            try
            {
                UCComboUAEscola1.CarregaEscolaPorUASuperiorSelecionada();

                if (UCComboUAEscola1.Uad_ID != Guid.Empty || !UCComboUAEscola1.DdlUA.Visible)
                {
                    UCComboUAEscola1.FocoEscolas   = true;
                    UCComboUAEscola1.EnableEscolas = true;
                }
                else
                {
                    UCComboUAEscola1.EnableEscolas = false;
                }

                UCFiltroEscolas1__SelecionarEscola();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMensagem.Text = UtilBO.GetErroMessage(RetornaValorResource("ErroCarregarSistema"), UtilBO.TipoMensagem.Erro);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Método para carregar um registro de aviso texto geral, a fim de atualizar suas informações.
        /// Recebe dados referente ao aviso texto geral para realizar busca.
        /// </summary>
        /// <param name="atg_id">ID do aviso texto geral</param>
        public void Carregar()
        {
            try
            {
                // Busca da SAAI – Sala de apoio e acompanhamento a inclusão baseado no ID da SAAI – Sala de apoio e acompanhamento a inclusão.
                ACA_AvisoTextoGeral entAviso = new ACA_AvisoTextoGeral {
                    atg_id = VS_atg_id
                };
                ACA_AvisoTextoGeralBO.GetEntity(entAviso);

                ESC_Escola entEscola = new ESC_Escola {
                    esc_id = entAviso.esc_id
                };
                ESC_EscolaBO.GetEntity(entEscola);

                if (UCComboUAEscola1.VisibleUA)
                {
                    // Buscar Unidade Administrativa Superior.
                    SYS_UnidadeAdministrativa entUA = new SYS_UnidadeAdministrativa {
                        ent_id = entEscola.ent_id, uad_id = entEscola.uad_id
                    };
                    SYS_UnidadeAdministrativaBO.GetEntity(entUA);

                    Guid uad_idSuperior = entEscola.uad_idSuperiorGestao.Equals(Guid.Empty) ? entUA.uad_idSuperior : entEscola.uad_idSuperiorGestao;

                    UCComboUAEscola1.Uad_ID = uad_idSuperior;

                    // Recarrega o combo de escolas com a uad_idSuperior.
                    UCComboUAEscola1.CarregaEscolaPorUASuperiorSelecionada();
                }

                //Carrega Escolas
                UCComboUAEscola1.MostraApenasAtivas   = true;
                UCComboUAEscola1.SelectedValueEscolas = new[] { entEscola.esc_id, entAviso.uni_id };
                UCComboUAEscola1.PermiteAlterarCombos = true;

                //Carrega curso
                UCComboCursoCurriculo.CarregarPorEscolaSituacaoCurso(UCComboUAEscola1.Esc_ID, UCComboUAEscola1.Uni_ID, 1);
                UCComboCursoCurriculo.Valor = new int[] { entAviso.cur_id, entAviso.crr_id };

                //Carrega situacao
                cmbSituacao.SelectedValue = entAviso.atg_situacao.ToString();

                //Carrega titulo
                txtTitulo.Text = entAviso.atg_titulo;

                //Carrega check do cabecalho
                chkTimbre.Checked = entAviso.atg_timbreCabecalho;

                //Carrega tipo de aviso e campos auxiliares
                UCComboCampoAuxiliar1.ValorComboTipo = entAviso.atg_tipo;

                //Carrega text cin descricao
                txtDescricao.Text = HttpUtility.HtmlDecode(entAviso.atg_descricao);
                //redactor_content.InnerText = HttpUtility.HtmlDecode(entAviso.atg_descricao);
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os avisos textos gerais.", UtilBO.TipoMensagem.Erro);
            }
        }