Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         cvData.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data");
     }
 }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(Page);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.CamposData));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JqueryMask));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MascarasCampos));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation));
        }

        UCComboCargo1.IndexChanged += SelecionarCargo;

        if (!IsPostBack)
        {
            LabelMatricula.Text        = "Matrícula";
            rfvMatricula.Visible       = false;
            cvVigenciIni.ErrorMessage  = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de vigência inicial");
            cvVigenciaFim.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de vigência final");

            UCComboCargo1.Obrigatorio     = true;
            UCComboCargo1.ValidationGroup = "Cargo";

            UCComboCargaHoraria1.MostrarMessageSelecione = true;
        }
        lblLegend.Text = GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA_PLURAL").ToString();
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(Page);

        if (sm != null)
        {
            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(ArquivoJS.MsgConfirmBtn));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsCadastroAlunoMatricula.js"));
        }

        string script = String.Format("SetConfirmDialogButton('{0}','{1}');",
                                      String.Concat("#", btnExcluir.ClientID), "Confirma a exclusão da foto?<br/> Atenção, essa operação não poderá ser desfeita e as alterações realizadas serão perdidas.");

        Page.ClientScript.RegisterStartupScript(GetType(), btnExcluir.ClientID, script, true);

        if (!IsPostBack)
        {
            try
            {
                string pessoa = string.Empty;

                if (_VS_tipoPessoa == 1)
                {
                    pessoa = " do aluno";
                }
                if (_VS_tipoPessoa == 2)
                {
                    pessoa = " do docente";
                }
                if (_VS_tipoPessoa == 3)
                {
                    pessoa = " do colaborador";
                }

                cvDataNascimento.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de nascimento" + pessoa);

                ComboNacionalidade1.Carregar();

                ComboTipoDeficiencia1.Carregar();
                ComboTipoDeficiencia1.Titulo = GestaoEscolarUtilBO.nomePadraoTipoDeficiencia(__SessionWEB.__UsuarioWEB.Usuario.ent_id);

                UCComboTipoEscolaridade1._MostrarMessageSelecione = true;
                UCComboTipoEscolaridade1._Load(0);
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
            }
        }

        if (_VS_alu_id > 0)
        {
            ComboTipoDeficiencia1.OnSeletedIndexChanged += UCComboTipoDeficiencia1_IndexChanged;
        }
    }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                ScriptManager sm = ScriptManager.GetCurrent(this);
                if (sm != null)
                {
                    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(ArquivoJS.CamposData));
                }
                cvDataFimMaiorAtual.ValueToCompare = DateTime.Now.ToString("d");

                lblMensagemInformacao.Text = UtilBO.GetErroMessage
                                                 (GetGlobalResourceObject("Academico", "AtribuicaoEsporadica.Cadastro.lblMensagemInformacao.Text").ToString()
                                                 , UtilBO.TipoMensagem.Informacao);

                UCFiltroEscolas._Selecionar += UCFiltroEscolas__Selecionar;

                if (!IsPostBack)
                {
                    cvDataFim.ErrorMessage    = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de fim");
                    cvDataInicio.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de início");

                    UCFiltroEscolas._LoadInicial(false);

                    if (PreviousPage != null && PreviousPage is Busca)
                    {
                        if (!__SessionWEB.__UsuarioWEB.GrupoPermissao.grp_alterar)
                        {
                            RedirecionaBuscaMensagem("Usuário não autorizado.", UtilBO.TipoMensagem.Alerta);
                        }

                        // Carregar dados da atribuição para alterar.
                        CarregarAlteracao(PreviousPage.Atribuicao);
                    }
                    else
                    {
                        if (!__SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir)
                        {
                            RedirecionaBuscaMensagem("Usuário não autorizado.", UtilBO.TipoMensagem.Alerta);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }
        }
Пример #5
0
        protected void btnSalvar_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    DateTime dataAnotacao = new DateTime();
                    if (!DateTime.TryParse(txtDataAnotacao.Text, out dataAnotacao))
                    {
                        throw new ValidationException(GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data da anotação"));
                    }
                    if (dataAnotacao == new DateTime())
                    {
                        throw new ValidationException("Data da anotação inválida.");
                    }

                    ACA_AlunoAnotacao ano = new ACA_AlunoAnotacao
                    {
                        alu_id = _VS_alu_id,
                        ano_id = VS_ano_id
                    };
                    ACA_AlunoAnotacaoBO.GetEntity(ano);

                    if (ano.IsNew)
                    {
                        ano.ano_dataCriacao = DateTime.Now;
                    }

                    ano.ano_anotacao      = txtAnotacao.Text;
                    ano.ano_dataAnotacao  = Convert.ToDateTime(txtDataAnotacao.Text);
                    ano.usu_id            = __SessionWEB.__UsuarioWEB.Usuario.usu_id;
                    ano.gru_id            = __SessionWEB.__UsuarioWEB.Grupo.gru_id;
                    ano.ano_situacao      = 1;
                    ano.ano_dataAlteracao = DateTime.Now;

                    ACA_AlunoAnotacaoBO.Save(ano);

                    ApplicationWEB._GravaLogSistema(VS_ano_id > 0 ? LOG_SistemaTipo.Update : LOG_SistemaTipo.Insert, "AnotacaoAluno alu_id:" + _VS_alu_id.ToString() +
                                                    " ano_id:" + ano.ano_id.ToString());
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "FecharAnotacao", "var exibirMensagemConfirmacao=false;$('#divCadastroAnotacao').dialog('close');", true);

                    LoadGridAnotacoes();
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao salvar anotação geral sobre o aluno.", UtilBO.TipoMensagem.Erro);
            }
        }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            cvData.ErrorMessage  = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Início do ano letivo");
            cvData2.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Fim do ano letivo");
            _revAno.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoAno("Ano letivo");

            VerificaPermissao();

            if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
            {
                _LoadFromEntity(PreviousPage.EditItem);
                Page.Form.DefaultFocus = _txtDescricao.ClientID;
            }
            else
            {
                Page.Form.DefaultFocus = _txtAno.ClientID;
                _btnSalvar.Visible     = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir;
            }

            try
            {
                CarregaPeriodo();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }

            pnlCursos.GroupingText = "Cadastro de " + GestaoEscolarUtilBO.nomePadraoCurso(__SessionWEB.__UsuarioWEB.Usuario.ent_id).ToLower() + " do calendário";

            Page.Form.DefaultButton = _btnSalvar.UniqueID;
        }

        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.CamposData));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.UiAriaTabs));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsTabs.js"));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmExclusao));
            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/jsCadastroCalendarioAnual.js"));
        }
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(Page);

        if (sm != null)
        {
            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/jsCadastroAluno.js"));
        }

        if (UCBuscaPessoasAluno != null)
        {
            // Valores padrão da busca de pessoas.
            UCBuscaPessoasAluno.Paginacao     = ApplicationWEB._Paginacao;
            UCBuscaPessoasAluno.ContainerName = "divBuscaPessoa";
            UCBuscaPessoasAluno.ReturnValues += UCPessoas1BuscaPessoa;
        }

        tdNis.Visible = ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.EXIBIR_NIS_FICHA_INSCRICAO, __SessionWEB.__UsuarioWEB.Usuario.ent_id);

        if (!IsPostBack)
        {
            UCComboSexo1.Visible = !(VS_TipoResponsavel == TipoResponsavel.Pai || VS_TipoResponsavel == TipoResponsavel.Mae);

            chkSituacaoFalecido.Visible = VS_TipoResponsavel != TipoResponsavel.Outro;

            chkApenasFiliacao.Visible        = false;
            chkNaoConstaCertidaoNasc.Visible = VS_TipoResponsavel != TipoResponsavel.Outro;
            chkOmitidoFormaLei.Visible       = VS_TipoResponsavel != TipoResponsavel.Outro;

            cvDataNascimento.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de nascimento do responsável");

            if (VS_TipoResponsavel != TipoResponsavel.Outro)
            {
                chkSituacaoFalecido.Attributes.Add("onClick", "escondeComponente(" + chkSituacaoFalecido.ClientID + "," + chkMoraComAluno.ClientID + ")");
                chkMoraComAluno.Attributes.Add("onClick", "escondeComponente(" + chkMoraComAluno.ClientID + "," + chkSituacaoFalecido.ClientID + ")");
            }
        }
    }
Пример #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(Page);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.CamposData));
        }

        if (!IsPostBack)
        {
            LabelMatricula.Text        = "Matrícula";
            rfvMatricula.Visible       = false;
            cvVigenciaIni.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de vigência inicial");
            cvVigenciaFim.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de vigência final");

            UCComboFuncao1.Obrigatorio     = true;
            UCComboFuncao1.ValidationGroup = "Funcao";
            UCComboFuncao1.CarregarFuncao();
        }
    }
Пример #9
0
        protected void btnSalvar_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    DateTime dataInicio = new DateTime();
                    if (!DateTime.TryParse(txtDataInicio.Text, out dataInicio))
                    {
                        throw new ValidationException(GestaoEscolarUtilBO.RetornaMsgValidacaoData(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.grvJustificativaFalta.ajf_dataInicio.HeaderText")));
                    }
                    if (dataInicio == new DateTime())
                    {
                        throw new ValidationException(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.grvJustificativaFalta.ajf_dataInicio.HeaderText"));
                    }

                    DateTime dataFim = new DateTime();
                    if (!DateTime.TryParse(txtDataFim.Text, out dataFim))
                    {
                        throw new ValidationException(GestaoEscolarUtilBO.RetornaMsgValidacaoData(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.grvJustificativaFalta.ajf_dataFim.HeaderText")));
                    }
                    if (dataFim == new DateTime())
                    {
                        throw new ValidationException(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.grvJustificativaFalta.ajf_dataFim.HeaderText"));
                    }

                    if (dataFim < dataInicio)
                    {
                        throw new ValidationException(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.ValidacaoData"));
                    }

                    ACA_AlunoJustificativaAbonoFalta justificativa = new ACA_AlunoJustificativaAbonoFalta
                    {
                        alu_id = VS_alu_id,
                        tud_id = VS_tud_id,
                        ajf_id = VS_ajf_id
                    };
                    ACA_AlunoJustificativaAbonoFaltaBO.GetEntity(justificativa);

                    justificativa.ajf_dataInicio = Convert.ToDateTime(txtDataInicio.Text);
                    justificativa.ajf_dataFim    = Convert.ToDateTime(txtDataFim.Text);
                    justificativa.ajf_observacao = txtObservacao.Text;
                    justificativa.ajf_situacao   = (byte)ACA_AlunoJustificativaAbonoFalta.Situacao.Ativo;
                    justificativa.ajf_status     = (byte)ACA_AlunoJustificativaAbonoFalta.Status.AguardandoProcessamento;

                    if (ACA_AlunoJustificativaAbonoFaltaBO.Save(justificativa))
                    {
                        lblMessage.Text = UtilBO.GetErroMessage(VS_ajf_id > 0 ? CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.SucessoUpdate") : CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.SucessoInsert"), UtilBO.TipoMensagem.Sucesso);
                        ApplicationWEB._GravaLogSistema(VS_ajf_id > 0 ? LOG_SistemaTipo.Update : LOG_SistemaTipo.Insert, string.Format("Justificativa de abono de falta - alu_id: {0} / tud_id: {1} / ajf_id: {2}", VS_alu_id, VS_tud_id, VS_ajf_id));
                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "FecharJustificativaFalta", "$('#divCadastroJustificativaFalta').dialog('close');", true);
                        LoadGridJustificativaFalta();
                    }
                    else
                    {
                        lblMessageCadastro.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.ErroSalvar"), UtilBO.TipoMensagem.Erro);
                    }
                }
            }
            catch (ValidationException ex)
            {
                lblMessageCadastro.Text = UtilBO.GetErroMessage(ex.Message, UtilBO.TipoMensagem.Alerta);
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessageCadastro.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.ErroSalvar"), UtilBO.TipoMensagem.Erro);
            }
        }
Пример #10
0
 protected void Page_Init(object sender, EventArgs e)
 {
     cvDtEmissao.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data emissão");
 }
Пример #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Individual)
        {
            __SessionWEB.PostMessages = "Usuário não possui permissão para acessar essa página.";
            Response.Redirect(__SessionWEB._AreaAtual._Diretorio + "Index.aspx", false);
        }

        try
        {
            ScriptManager sm = ScriptManager.GetCurrent(this);
            if (sm != null)
            {
                sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmExclusao));
                sm.Scripts.Add(new ScriptReference(ArquivoJS.CamposData));
                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/JS-ModuloAcademico.js"));
            }

            if (!IsPostBack)
            {
                cvDataInicio.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de início do evento");
                cvDataFim.ErrorMessage    = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de fim do evento");

                //Carregar a tela validando os campos necessários do filtro escola.
                _ValidaCamposFiltroEscola(true);

                UCCTipoPeriodoCalendario1.CarregarTipoPeriodoCalendario(false);

                MostraTipoPeriodoCalendario(false);
                chkPadrao.Checked = false;

                // busco eventos parametrizados para as efetivações
                VS_Evt_EfetivacaoNotas       = Convert.ToInt32(ACA_ParametroAcademicoBO.ParametroValorPorEntidade(eChaveAcademico.TIPO_EVENTO_EFETIVACAO_NOTAS, __SessionWEB.__UsuarioWEB.Usuario.ent_id));
                VS_Evt_EfetivacaoRecuperacao = Convert.ToInt32(ACA_ParametroAcademicoBO.ParametroValorPorEntidade(eChaveAcademico.TIPO_EVENTO_EFETIVACAO_RECUPERACAO, __SessionWEB.__UsuarioWEB.Usuario.ent_id));
                VS_Evt_EfetivacaoFinal       = Convert.ToInt32(ACA_ParametroAcademicoBO.ParametroValorPorEntidade(eChaveAcademico.TIPO_EVENTO_EFETIVACAO_FINAL, __SessionWEB.__UsuarioWEB.Usuario.ent_id));
                VS_Evt_EfetivacaoRecFinal    = Convert.ToInt32(ACA_ParametroAcademicoBO.ParametroValorPorEntidade(eChaveAcademico.TIPO_EVENTO_EFETIVACAO_RECUPERACAO_FINAL, __SessionWEB.__UsuarioWEB.Usuario.ent_id));

                if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
                {
                    _LoadFromEntity(PreviousPage.EditItem);
                    Page.Form.DefaultFocus = _txtNome.ClientID;
                }
                else
                {
                    // carrega as listas para selecao de calendários
                    CarregaCalendarios(0);

                    _UCComboTipoEvento.CarregarTipoEvento(1);
                    _UCComboTipoEvento.Obrigatorio     = true;
                    _UCComboTipoEvento.ValidationGroup = "evento";

                    if (ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.EXIBIR_SELECIONADO_COM_ATIVIDADE_DISCENTE, __SessionWEB.__UsuarioWEB.Usuario.ent_id))
                    {   // somente deve marcar a opção se "Com atividade discente" se o parametro estiver com Sim, caso contrario, o radio
                        // fica em branco
                        rblAtividadeDiscente.SelectedValue = "False";
                    }

                    Page.Form.DefaultFocus = _UCFiltroEscolas._VS_FiltroEscola ? _UCFiltroEscolas._ComboUnidadeAdministrativa.ClientID : _UCFiltroEscolas._ComboUnidadeEscola.ClientID;

                    _btnSalvar.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir;
                }

                Page.Form.DefaultButton = _btnSalvar.UniqueID;
                chkPadrao.Visible       = __SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Administracao;
            }

            // Inicializacao dos DELEGATES
            _UCFiltroEscolas._Selecionar           += _UCFiltroEscolas__Selecionar;
            _UCComboTipoEvento.IndexChanged        += _UCComboTipoEvento_IndexChanged;
            UCCTipoPeriodoCalendario1.IndexChanged += UCCTipoPeriodoCalendario_IndexChanged;
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
        }
    }
Пример #12
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;
    }
Пример #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     cvDataNascimento.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de nascimento do aluno");
 }
Пример #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            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(ArquivoJS.CamposData));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.UiAriaTabs));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsTabs.js"));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmExclusao));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmBtn));
            sm.Scripts.Add(new ScriptReference("~/Includes/jsBuscaAlunos.js"));
        }

        if (__SessionWEB.__UsuarioWEB.GrupoPermissao.grp_consultar)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), fdsConsulta.ClientID, String.Format("MsgInformacao('{0}');", String.Concat("#", fdsConsulta.ClientID)), true);
        }

        UCComboQtdePaginacao1.GridViewRelacionado = _grvAluno;

        if (!IsPostBack)
        {
            try
            {
                if (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Individual)
                {
                    if (__SessionWEB.__UsuarioWEB.Docente.doc_id > 0)
                    {
                        _VS_doc_id = __SessionWEB.__UsuarioWEB.Docente.doc_id;
                    }
                    else
                    {
                        _lblMessage.Text      = UtilBO.GetErroMessage("Este usuário não tem permissão de acesso a esta página.", UtilBO.TipoMensagem.Alerta);
                        fdsResultados.Visible = false;
                        fdsConsulta.Visible   = false;
                        return;
                    }
                }

                cvDataNascimento.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de nascimento do aluno");
                cvData.ErrorMessage           = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data de cadastro");
                CustomValidator1.ErrorMessage = GestaoEscolarUtilBO.RetornaMsgValidacaoData("Data da última atualização");

                // Se for docente, não carrega as escolas.
                if (_VS_doc_id <= 0)
                {
                    uccUaEscola.FiltroEscolasControladas = true;
                    uccUaEscola.Inicializar();
                }

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

                // Carrega o nome referente ao parametro de matricula estadual.
                string nomeMatriculaEstadual =
                    ACA_ParametroAcademicoBO.ParametroValorPorEntidade(eChaveAcademico.MATRICULA_ESTADUAL, __SessionWEB.__UsuarioWEB.Usuario.ent_id);
                bool mostraMatriculaEstadual = !string.IsNullOrEmpty(nomeMatriculaEstadual);

                // Configura os campos de matrícula estadual e matrícula, de acordo com o parâmetro.
                _lblMatrEst.Text              = nomeMatriculaEstadual;
                _lblMatrEst.Visible           = mostraMatriculaEstadual;
                _txtMatriculaEstadual.Visible = mostraMatriculaEstadual;

                _grvAluno.Columns[indiceColunaMatriculaEstadual].HeaderText = nomeMatriculaEstadual;
                _grvAluno.Columns[indiceColunaMatriculaEstadual].Visible    = mostraMatriculaEstadual;

                _grvAluno.Columns[indiceColunaMatricula].Visible = !mostraMatriculaEstadual;
                _lblMatricula.Visible = !mostraMatriculaEstadual;
                _txtMatricula.Visible = !mostraMatriculaEstadual;

                _divPesquisa.Visible        = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_consultar;
                _btnPesquisar.Visible       = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_consultar;
                _btnLimparPesquisar.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_consultar;

                // Exibe coluna 'alterar foto' se parâmetro está definido como true,
                // ou se grupo do usuário tem permissão de alteração e usuário está logado com visão diferente da Individual.
                _grvAluno.Columns[indiceColunaCapturarFoto].Visible =
                    (__SessionWEB.__UsuarioWEB.GrupoPermissao.grp_alterar &&
                     __SessionWEB.__UsuarioWEB.Grupo.vis_id != SysVisaoID.Individual) || ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.PERMITIR_ALTERAR_FOTO_ALUNO_CONSULTA, __SessionWEB.__UsuarioWEB.Usuario.ent_id);

                _grvAluno.Columns[indiceColunaAnotacoes].Visible = ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.EXIBIR_ANOTACOES_BUSCA_ALUNO, __SessionWEB.__UsuarioWEB.Usuario.ent_id);

                bool mostraBoletim = ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.MOSTRAR_COLUNA_BOLETIM_MANUTENCAO_ALUNO, __SessionWEB.__UsuarioWEB.Usuario.ent_id);

                _grvAluno.Columns[indiceColunaBoletim].Visible = mostraBoletim;

                _grvAluno.Columns[indiceColunaRelatorioPedagogico].Visible = ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.MOSTRAR_COLUNA_RELATORIOPEDAGOGICO_MANUTENCAO_ALUNO, __SessionWEB.__UsuarioWEB.Usuario.ent_id);

                chkApenasGemeos.Visible = PermiteAlunoGemeo;

                if (_VS_doc_id > 0)
                {
                    fdsResultados.Visible = true;
                    fdsConsulta.Visible   = true;
                    divSituacao.Visible   = false;
                }

                CarregaComboSituacaoAluno();

                VerificaBusca();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }

            if (uccUaEscola.FiltroEscola)
            {
                uccUaEscola.FocusUA();
            }
            else
            {
                uccUaEscola.FocusEscolas();
            }

            Page.Form.DefaultButton = _btnPesquisar.UniqueID;
        }

        if (_VS_doc_id > 0)
        {
            uccUaEscola.Visible = false;
        }
        else
        {
            chkPesquisarTodasEscolas.Visible = __SessionWEB.__UsuarioWEB.Grupo.vis_id != SysVisaoID.Administracao;
        }
    }