Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmExclusao));
        }
        if (!IsPostBack)
        {
            string message = __SessionWEB.PostMessages;
            if (!String.IsNullOrEmpty(message))
            {
                lblMessage.Text = message;
            }
            try
            {
                gvPeriodoCurso.PageSize = ApplicationWEB._Paginacao;

                UCComboTipoNivelEnsino.CarregarTipoNivelEnsino();
                UCComboTipoModalidadeEnsino.CarregarTipoModalidadeEnsino();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
            }
            Page.Form.DefaultFocus  = UCComboTipoNivelEnsino.Combo_ClientID;
            Page.Form.DefaultButton = btnPesquisar.UniqueID;

            lblLegendaBuscaPeriodoCurso.Text = "Consulta de" + " " + "tipos de" + " " + GestaoEscolarUtilBO.nomePadraoPeriodo(__SessionWEB.__UsuarioWEB.Usuario.ent_id).ToLower();
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                UCComboTipoModalidadeEnsino.CarregarTipoModalidadeEnsino();
                UCComboTipoNivelEnsino.CarregarTipoNivelEnsino();

                GestaoEscolarUtilBO.CarregarComboEnum <eConfiguracaoServicoPendenciaSemRelatorioAtendimento>(cblSemRelatorioAtendimento.Items, true);

                if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
                {
                    VS_csp_id = PreviousPage.Edit_csp_id;
                    if (VS_csp_id > 0)
                    {
                        Carregar();
                    }
                }
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage(GetGlobalResourceObject("Academico", "ConfiguracaoServicoPendencia.Configuracao.ErroSistema").ToString(), UtilBO.TipoMensagem.Erro);
            }
            Page.Form.DefaultFocus = UCComboTipoNivelEnsino.ClientID;
        }
    }
Пример #3
0
        private void Inicializar()
        {
            try
            {
                VerificaPermissaoUsuario();

                UCComboTipoModalidadeEnsino.CarregarTipoModalidadeEnsino();
                UCComboTipoNivelEnsino.CarregarTipoNivelEnsino();

                VerificaBusca();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage(GetGlobalResourceObject("Academico", "ConfiguracaoServicoPendencia.Busca.ErroInicializar").ToString(), UtilBO.TipoMensagem.Erro);
            }
        }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);

        if (sm != null)
        {
            sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmExclusao));
            sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation));
        }
        if (!IsPostBack)
        {
            try
            {
                if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
                {
                    VS_tcp_id = PreviousPage.EditItem;

                    //seta true se a página é postBack
                    VS_previous = true;
                    Carregar(VS_tcp_id);
                }
                else
                {
                    Response.Redirect(__SessionWEB._AreaAtual._Diretorio + "Configuracao/TipoPeriodoCurso/Busca.aspx", false);
                    HttpContext.Current.ApplicationInstance.CompleteRequest();
                }

                UCComboTipoNivelEnsino.CarregarTipoNivelEnsino();
                Page.Form.DefaultFocus = UCComboTipoNivelEnsino.Combo_ClientID;
                UCComboTipoModalidadeEnsino.CarregarTipoModalidadeEnsino();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar os dados.", UtilBO.TipoMensagem.Erro);
            }

            lblLegendaCadastroPeriodoCurso.Text = "Cadastro de" + " " + "tipo de" + " " + GestaoEscolarUtilBO.nomePadraoPeriodo(__SessionWEB.__UsuarioWEB.Usuario.ent_id).ToLower();
            lblDescricao.Text = "Tipo de" + " " + GestaoEscolarUtilBO.nomePadraoPeriodo(__SessionWEB.__UsuarioWEB.Usuario.ent_id).ToLower() + "*";
        }
    }