protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["usuario"] == null)
        {
            Response.Redirect("../Erro.aspx");
        }

        Pej_Pessoa_Juridica pej = (Pej_Pessoa_Juridica)Session["usuario"];

        //EVENTOS DO LOCAL
        try
        {
            DataSet ds  = Eve_EventosBD.SelectEventosLocal(pej);
            int     qtd = ds.Tables[0].Rows.Count;

            int eve_codigo = Convert.ToInt32(ds.Tables[0].Rows[0]["eve_codigo"]);
            if (qtd > 0 && eve_codigo != 0)
            {
                cardVazio.Visible  = false;
                rptCard.DataSource = ds;
                rptCard.DataBind();
            }
        }
        catch (Exception ex)
        {
        }

        //HISTÓRICO DE EVENTOS
        try
        {
            DataSet ds2  = Eve_EventosBD.SelectHistoricoEventos(pej);
            int     qtd2 = ds2.Tables[0].Rows.Count;

            int eve_codigo2 = Convert.ToInt32(ds2.Tables[0].Rows[0]["eve_codigo"]);
            if (qtd2 > 0 && eve_codigo2 != 0)
            {
                historicoVazio.Visible  = false;
                RptHistorico.DataSource = ds2;
                RptHistorico.DataBind();
            }
        }
        catch (Exception ex)
        {
        }

        if (!IsPostBack)
        {
            CarregarDDL();
        }

        DataSet dsEnd  = Pej_Pessoa_JuridicaBD.GetEndereco(pej.End_cep.End_cep);
        string  cidade = Convert.ToString(dsEnd.Tables[0].Rows[0]["end_cidade"]);
        string  uf     = Convert.ToString(dsEnd.Tables[0].Rows[0]["end_uf"]);

        ltlEnd.Text  = "<h5>" + cidade + " - " + uf + "</h5>";
        ltlNome.Text = "<h3 class='nomePerfil'>" + pej.Pej_nome_ficticio + "</h3>";

        DataSet ds3  = Pej_Pessoa_JuridicaBD.Select(pej);
        int     qtd3 = ds3.Tables[0].Rows.Count;

        if (qtd3 > 0)
        {
            RptImage.DataSource = ds3;
            RptImage.DataBind();
        }
        else
        {
        }

        //ESPORTES ADICIONADOS
        Ofe_Oferece ofe = new Ofe_Oferece();

        ofe.Pej_codigo = pej;
        DataSet ds4  = Ofe_OfereceBD.SelectOferecidos(ofe);
        int     qtd4 = ds4.Tables[0].Rows.Count;

        if (qtd4 > 0)
        {
            espVazio.Visible      = false;
            RptEsporte.DataSource = ds4;
            RptEsporte.DataBind();
        }
        else
        {
            espVazio.Visible = true;
        }

        //MODAL DE ATUALIZAÇÃO DA FOTO DE PERFIL
        DataSet ds5  = Pej_Pessoa_JuridicaBD.Select(pej);
        int     qtd5 = ds5.Tables[0].Rows.Count;

        if (qtd5 > 0)
        {
            RptImageEdit.DataSource = ds5;
            RptImageEdit.DataBind();
        }
        else
        {
        }
    }