protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            dt = all.showpagecontentP("homecontent");
            if (dt.Rows.Count > 0)
            {
                //lblwhoamiHead1.Text = dt.Rows[0]["heading1"].ToString();
                //lblwhoamiHead2.Text = dt.Rows[0]["heading2"].ToString();
                //lblwhoamidesc.Text = dt.Rows[0]["content"].ToString();
                //lblabouthome.Text = dt.Rows[0]["content"].ToString();
                lblhd1.Text = dt.Rows[0]["heading1"].ToString();
                lblhd2.Text = dt.Rows[0]["heading2"].ToString();
                lblhd3.Text = dt.Rows[0]["content"].ToString();
            }



            rptfeatures.DataSource = bind_features();
            rptfeatures.DataBind();

            Rptabotsrvc.DataSource = all.aboutservices();
            Rptabotsrvc.DataBind();

            rptrteam.DataSource = all.Team();
            rptrteam.DataBind();
            Rpttesti.DataSource = all.Testimonial();
            Rpttesti.DataBind();
            rptrprtnt.DataSource = all.prtner();
            rptrprtnt.DataBind();

            RptImage.DataSource = all.showpagecontentP("homecontentimg");
            RptImage.DataBind();
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["usuario"] == null)
        {
            Response.Redirect("../Erro.aspx");
        }

        Pef_Pessoa_Fisica pef = (Pef_Pessoa_Fisica)Session["usuario"];

        if (!IsPostBack)
        {
            CarregarDDL();

            //PESQUISA DEFAULT
            DataSet dsCidade = Pef_Pessoa_FisicaBD.GetCidade(pef);
            string  cidade   = Convert.ToString(dsCidade.Tables[0].Rows[0]["end_cidade"]);
            DataSet ds2      = Par_PartidasBD.PesquisaDefault(cidade, pef);
            int     qtd2     = ds2.Tables[0].Rows.Count;
            if (qtd2 > 0)
            {
                PesquisaVazia.Visible = false;
                rptCard2.DataSource   = ds2;
                rptCard2.DataBind();
            }
            else
            {
                PesquisaVazia.Visible = true;
                PesquisaCheia.Visible = false;
            }

            //PARTIDAS PARTICIPANDO
            DataSet ds  = Par_PartidasBD.Select(pef.Pef_codigo);
            int     qtd = ds.Tables[0].Rows.Count;
            try
            {
                int par_codigo = Convert.ToInt32(ds.Tables[0].Rows[0]["par_codigo"]);
                if (qtd > 0 && par_codigo != 0)
                {
                    cardVazio.Visible  = false;
                    rptCard.DataSource = ds;
                    rptCard.DataBind();
                }
            }
            catch (Exception ex)
            {
            }
        }
        // NOME -- DATA -- GENERO
        ltlNome.Text   = "<h3 class='nomePerfil'>" + pef.Pef_nome + "</h3>";
        ltlIdade.Text  = "<h5>" + getIdade(pef.Pef_data_nascimento) + "</h45>";
        ltlGenero.Text = "<h5>" + pef.Pef_genero + "<h5>";



        //FOTO DE PERFIL
        DataSet ds3  = Pef_Pessoa_FisicaBD.Select(pef);
        int     qtd3 = ds3.Tables[0].Rows.Count;

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

        //ESPORTES PRATICADOS
        Pra_Pratica pra = new Pra_Pratica();

        pra.Pef_codigo = pef;
        DataSet ds4  = Pra_PraticaBD.SelectPraticados(pra);
        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  = Pef_Pessoa_FisicaBD.Select(pef);
        int     qtd5 = ds5.Tables[0].Rows.Count;

        if (qtd5 > 0)
        {
            RptImageEdit.DataSource = ds5;
            RptImageEdit.DataBind();
        }
        else
        {
        }
    }
    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
        {
        }
    }