Exemplo 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);
            }
        }
Exemplo n.º 2
0
    private void UCFiltroEscolas1__SelecionarEscola()
    {
        try
        {
            if (UCFiltroEscolas1._ComboUnidadeEscola.SelectedValue != "-1;-1")
            {
                UCComboCursoCurriculo1.Obrigatorio = true;
                UCComboCursoCurriculo1.CarregarCursoCurriculoPorEscola(UCFiltroEscolas1._UCComboUnidadeEscola_Esc_ID, UCFiltroEscolas1._UCComboUnidadeEscola_Uni_ID, 0);
                UCComboCursoCurriculo1.PermiteEditar = true;
                UCComboCursoCurriculo1.SetarFoco();
            }
            else
            {
                UCComboCursoCurriculo1.Obrigatorio = true;
                UCComboCursoCurriculo1.CarregarCursoCurriculo();
                UCComboCursoCurriculo1.PermiteEditar = false;
            }

            UCComboCurriculoPeriodo1._Combo.Items.Clear();
            UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
            UCComboCurriculoPeriodo1._Load(-1, -1);
            UCComboCurriculoPeriodo1._Combo.Enabled = false;
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            lblMessageMatricula.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
        finally
        {
            updMatricula.Update();
        }
    }
Exemplo n.º 3
0
 /// <summary>
 /// Evento change do combo de Escola.
 /// </summary>
 private void UCFiltroEscolas1__SelecionarEscola()
 {
     try
     {
         if (PaginaBusca == PaginaGestao.ProgressaoPEJA)
         {
             if (UCComboUAEscola1.Esc_ID > 0)
             {
                 UCComboCursoCurriculo1.CarregarCursoCurriculoPorEscolaPEJA(UCComboUAEscola1.Esc_ID, UCComboUAEscola1.Uni_ID, 0);
                 UCComboCursoCurriculo1.SetarFoco();
             }
             else
             {
                 UCComboCursoCurriculo1.CarregarCursoCurriculoPorEscolaPEJA(-1, -1, 0);
             }
         }
         else
         {
             if (UCComboUAEscola1.Esc_ID > 0)
             {
                 UCComboCursoCurriculo1.CarregarCursoCurriculoPorEscola(UCComboUAEscola1.Esc_ID, UCComboUAEscola1.Uni_ID, 0);
                 UCComboCursoCurriculo1.SetarFoco();
             }
             else
             {
                 UCComboCursoCurriculo1.CarregarCursoCurriculo();
             }
         }
     }
     catch (Exception ex)
     {
         ApplicationWEB._GravaErro(ex);
         lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o(s) curso(s) da unidade escolar.", UtilBO.TipoMensagem.Erro);
     }
 }
Exemplo n.º 4
0
        protected void UCComboUAEscola_IndexChangedUnidadeEscola()
        {
            try
            {
                UCComboCursoCurriculo1.Valor         = new[] { -1, -1 };
                UCComboCursoCurriculo1.PermiteEditar = false;

                if (UCComboUAEscola.Esc_ID > 0 && UCComboUAEscola.Uni_ID > 0)
                {
                    UCComboCursoCurriculo1.CarregarPorEscola(UCComboUAEscola.Esc_ID,
                                                             UCComboUAEscola.Uni_ID);

                    UCComboCursoCurriculo1.SetarFoco();
                    UCComboCursoCurriculo1.PermiteEditar = true;
                }

                UCComboCursoCurriculo1_IndexChanged();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
                _lblMessage.Focus();
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string message = __SessionWEB.PostMessages;
                if (!String.IsNullOrEmpty(message))
                {
                    lblMensagem.Text = message;
                    updMessage.Update();
                }

                if (!IsPostBack)
                {
                    VerificaPermissaoUsuario();

                    // Carrega os combos.
                    UCComboCursoCurriculo1.CarregarCursoCurriculoSituacao(1);
                    UCComboCalendario1.CarregarCalendarioAnual();

                    UCComboTipoDisciplina1.CarregarTipoDisciplinaPorCursoCurriculoPeriodo(1, 1, 1);
                    UCComboTipoDisciplina1.PermiteEditar = false;

                    UCComboCurriculoPeriodo1._Combo.Enabled = false;
                    UCComboCurriculoPeriodo1.CancelSelect   = true;

                    UCComboMatrizHabilidades.Carregar();

                    bool orientacoesCurricularesAula =
                        ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.PLANEJAMENTO_ANUAL_ORIENTACOES_CURRICULARES_AULAS, __SessionWEB.__UsuarioWEB.Usuario.ent_id);
                    string url = orientacoesCurricularesAula ? "~/Academico/OrientacaoCurricular/CadastroHabilidade.aspx" :
                                 "~/Academico/OrientacaoCurricular/Cadastro.aspx";
                    UCComboMatrizHabilidades.Visible = orientacoesCurricularesAula;

                    btnPesquisar.PostBackUrl = url;
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
                updMessage.Update();
            }

            Page.Form.DefaultButton = btnPesquisar.UniqueID;
            Page.Form.DefaultFocus  = UCComboCursoCurriculo1.Combo_ClientID;

            UCComboCursoCurriculo1.IndexChanged             += UCComboCursoCurriculo1_IndexChanged;
            UCComboCurriculoPeriodo1._OnSelectedIndexChange += UCComboCurriculoPeriodo1_IndexChanged;
        }
Exemplo n.º 6
0
        /// <summary>
        /// Evento change do combo calendario
        /// </summary>
        private void UCCCalendario1_IndexChanged()
        {
            UCCCurriculoPeriodo1.PermiteEditar   = false;
            UCCCurriculoPeriodo1.Valor           = new[] { -1, -1, -1 };
            UCComboCursoCurriculo1.PermiteEditar = false;
            UCComboCursoCurriculo1.Valor         = new[] { -1, -1 };

            if (UCComboUAEscola1.Esc_ID > 0 && UCCCalendario1.Valor > 0)
            {
                UCComboCursoCurriculo1.PermiteEditar = true;
                // Carregar todos os cursos, não só ativos, para exibir turmas encerradas na busca.
                UCComboCursoCurriculo1.CarregarPorEscolaCalendarioSituacaoCurso(UCComboUAEscola1.Esc_ID, UCComboUAEscola1.Uni_ID, UCCCalendario1.Valor, 0);
                UCComboCursoCurriculo1.SetarFoco();
            }

            UCComboCursoCurriculo1_IndexChanged();
        }
Exemplo n.º 7
0
 private void UCComboCalendario1_IndexChanged()
 {
     try
     {
         UCComboCursoCurriculo1.Valor         = new[] { -1, -1 };
         UCComboCursoCurriculo1.PermiteEditar = false;
         if (UCComboCalendario1.Valor > 0)
         {
             UCComboCursoCurriculo1.CarregarPorEscolaCalendarioSituacaoCurso(UCComboUAEscola.Esc_ID, UCComboUAEscola.Uni_ID, UCComboCalendario1.Valor, 1);
             UCComboCursoCurriculo1.SetarFoco();
             UCComboCursoCurriculo1.PermiteEditar = true;
         }
         UCComboCursoCurriculo1_IndexChanged();
     }
     catch (Exception ex)
     {
         ApplicationWEB._GravaErro(ex);
         lblMessage.Text = UtilBO.GetErroMessage(GetGlobalResourceObject("Relatorios", "AtaFinalResultado.Busca.lblMessage.ErroCarregarDados").ToString(), UtilBO.TipoMensagem.Erro);
     }
 }
Exemplo n.º 8
0
 protected void UCComboCalendario1_IndexChanged()
 {
     try
     {
         if (UCComboCalendario1.Valor > 0)
         {
             UCComboCursoCurriculo1.CarregarCursoCurriculoPorEscolaCalendario(-1, -1, 0, UCComboCalendario1.Valor);
             UCComboCursoCurriculo1.PermiteEditar = true;
         }
         else
         {
             UCComboCursoCurriculo1.Valor         = new int[] { -1, -1 };
             UCComboCursoCurriculo1.PermiteEditar = false;
         }
     }
     catch (Exception ex)
     {
         ApplicationWEB._GravaErro(ex);
         lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
     }
 }
Exemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // Carrega os combos.
                UCComboCursoCurriculo1.CarregarCursoCurriculoSituacao(1);
                UCComboCurriculoPeriodo1._Combo.Enabled = false;
                UCComboCurriculoPeriodo1.CancelSelect   = true;


                if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
                {
                    VS_nap_id = PreviousPage.EditItem_Nap_id;
                    LoadFromEntity(VS_nap_id);
                    Page.Form.DefaultFocus = txtDescricao.ClientID;
                }

                Page.Form.DefaultButton = bntSalvar.UniqueID;
            }

            UCComboCursoCurriculo1.IndexChanged += UCComboCursoCurriculo1_IndexChanged;
        }
Exemplo n.º 10
0
    private void UCFiltroEscolas1__Selecionar()
    {
        try
        {
            if (UCFiltroEscolas1._VS_FiltroEscola)
            {
                UCFiltroEscolas1._UnidadeEscola_LoadBy_uad_idSuperior(new Guid(UCFiltroEscolas1._ComboUnidadeAdministrativa.SelectedValue));
            }

            if (UCFiltroEscolas1._ComboUnidadeAdministrativa.SelectedValue == Guid.Empty.ToString())
            {
                UCFiltroEscolas1._ComboUnidadeEscola.Enabled = false;
            }
            else
            {
                UCFiltroEscolas1._ComboUnidadeEscola.Enabled = true;
                UCFiltroEscolas1._ComboUnidadeEscola.Focus();
            }

            UCComboCursoCurriculo1.Obrigatorio = true;
            UCComboCursoCurriculo1.CarregarCursoCurriculo();
            UCComboCursoCurriculo1.PermiteEditar = false;

            UCComboCurriculoPeriodo1._Combo.Items.Clear();
            UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
            UCComboCurriculoPeriodo1._Load(-1, -1);
            UCComboCurriculoPeriodo1._Combo.Enabled = false;
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            lblMessageMatricula.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
        finally
        {
            updMatricula.Update();
        }
    }
Exemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.UiAriaTabs));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.Tabs));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JqueryMask));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MascarasCampos));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsCadastroPessoa.js"));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsUCCadastroEndereco.js"));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsCadastroCertidaoCivil.js"));
            sm.Services.Add(new ServiceReference("~/WSServicos.asmx"));
        }

        if (!IsPostBack)
        {
            cvDataNascimento.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de nascimento do aluno");
            CustomValidator1.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de emissão da certidão de nascimento");

            string message = __SessionWEB.PostMessages;
            if (!String.IsNullOrEmpty(message))
            {
                lblMessage.Text = message;
            }

            lblMatriculaEstadual.Text         = GestaoEscolarUtilBO.nomePadraoMatriculaEstadual() + " *";
            rfvMatriculaEstadual.ErrorMessage = GestaoEscolarUtilBO.nomePadraoMatriculaEstadual() + " é obrigatório.";

            UCComboTipoDeficiencia1._MostrarMessageSelecione = true;
            UCComboTipoDeficiencia1._Load(Guid.Empty, 0);

            UCEnderecos1.Inicializar(false, true, string.Empty);

            UCFiltroEscolas1.SelecionaCombosAutomatico             = false;
            UCFiltroEscolas1.UnidadeAdministrativaCampoObrigatorio = true;
            UCFiltroEscolas1.EscolaCampoObrigatorio = true;
            UCFiltroEscolas1._LoadInicial();

            UCComboCursoCurriculo1.Obrigatorio = true;
            UCComboCursoCurriculo1.CarregarCursoCurriculo();
            UCComboCursoCurriculo1.PermiteEditar = false;

            UCComboCurriculoPeriodo1._Label.Text += " *";
            UCComboCurriculoPeriodo1._MostrarMessageSelecione = true;
            UCComboCurriculoPeriodo1._Load(-1, -1);
            UCComboCurriculoPeriodo1._Combo.Enabled      = false;
            UCComboCurriculoPeriodo1.ExibeFormatoPeriodo = true;
            cvCurriculoPeriodo.ErrorMessage = GestaoEscolarUtilBO.nomePadraoPeriodo() + " é obrigatório.";

            try
            {
                if (__SessionWEB._cid_id != Guid.Empty)
                {
                    END_Cidade cid = new END_Cidade {
                        cid_id = __SessionWEB._cid_id
                    };
                    END_CidadeBO.GetEntity(cid);

                    _txtCid_id.Value     = cid.cid_id.ToString();
                    txtNaturalidade.Text = cid.cid_nome;

                    _txtCid_idCertidao.Value = cid.cid_id.ToString();
                    txtCidadeCertidao.Text   = cid.cid_nome;
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }

            UCGridContato1._CarregarContato();

            UCComboTipoDeficiencia1._Label.Text = "Necessidade educacional especial";
            UCComboEstadoCivil1._Label.Text     = "Estado civil *";
            UCComboRacaCor1._Label.Text         = "Raça / cor *";
            UCComboSexo1._Label.Text            = "Sexo *";

            UCComboEstadoCivil1._Combo.SelectedValue = "1";
            _ddlSituacao.SelectedValue = "1";

            Page.Form.DefaultFocus  = txtMatriculaEstadual.ClientID;
            Page.Form.DefaultButton = btnSalvarNovo.UniqueID;
            btnSalvarNovo.Visible   = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir;
        }

        UCFiltroEscolas1._Selecionar        += UCFiltroEscolas1__Selecionar;
        UCFiltroEscolas1._SelecionarEscola  += UCFiltroEscolas1__SelecionarEscola;
        UCComboCursoCurriculo1.IndexChanged += UCComboCursoCurriculo1_IndexChanged;
    }