Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Nome.Text = Session["usuario"].ToString();
            DataSet ds = sql.retornaDs("SELECT * FROM tblColecao c  INNER JOIN tblCliente cl ON cl.id_cliente = c.id_cliente AND usuario ='" + Session["usuario"].ToString() + "'");

            if (!Page.IsPostBack)
            {
                DataList1.DataSource = ds.Tables[0];
                DataList1.DataBind();
            }

            if (sql.segundoGaleria(Session["usuario"].ToString()))
            {
                imgStatus.Attributes.Add("style", "display:none");
                header.Attributes["class"] = "galeria-header is-showing";
            }
            else
            {
                imgStatus.Attributes.Add("style", "display:block");
                header.Attributes["class"] = "galeria-header";
                ds.Tables[0].Rows[0].Delete();
                DataList1.DataSource = ds;
                DataList1.DataBind();
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["logado"].ToString() == "1")
            {
                sobre.Attributes.Add("style", "display:none");
                logoacr.Attributes["href"] = "galeria.aspx";
            }

            ds = sql.retornaDs("SELECT TOP 3 * FROM tblProdutoDaLoja");
            DataList1.DataSource = ds.Tables[0];
            DataList1.DataBind();

            ds = sql.retornaDs("SELECT * FROM tblProdutoDaloja WHERE id_produto > 3");
            DataList2.DataSource = ds.Tables[0];
            DataList2.DataBind();
        }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         string CurrentUrl = HttpContext.Current.Request.Url.AbsoluteUri;
         CurrentUrl           = CurrentUrl.Substring(CurrentUrl.LastIndexOf("=") + 1);
         ds                   = sql.retornaDs("SELECT * FROM tblTecladoCustomizado t INNER JOIN tblCliente c ON c.id_cliente = t.id_cliente AND usuario='" + Session["usuario"] + "' AND id_colecao =" + CurrentUrl);
         DataList1.DataSource = ds.Tables[0];
         DataList1.DataBind();
     }
 }