Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                _VS_CarregouTiposDeficiencias = false;

                UCComboAreaConhecimento1.CarregarAreaConhecimento();

                if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
                {
                    _Carregar(PreviousPage.EditItem);
                }

                UCComboTipoNivelEnsino1.Obrigatorio = true;
                UCComboTipoNivelEnsino1.CarregarTipoNivelEnsino();

                Page.Form.DefaultFocus = _txtTipoDisciplina.ClientID;

                _rfvTipoDisciplina.ErrorMessage = "Tipo de " + GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " é obrigatório.";

                habilitaDivDisciplinaEspecial();

                pnlDeficiencias.GroupingText = GestaoEscolarUtilBO.nomePadraoTipoDeficiencia(__SessionWEB.__UsuarioWEB.Usuario.ent_id);
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }
        }
    }
Ejemplo n.º 2
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;
        }
    }