Exemple #1
0
 protected void Bind()
 {
     Label3.Text          = cartItemService.GetTotalPriceByCustomerId(Convert.ToInt32(Session["CustomerId"])).ToString();
     GridView1.DataSource = cartItemService.GetCartItemsByCustomerId(Convert.ToInt32(Session["CustomerId"]));
     GridView1.DataBind();
     if (GridView1.Rows.Count != 0)
     {
         Panel1.Visible = true;
         Label4.Text    = "";
     }
     else
     {
         Panel1.Visible = false;
         Label4.Text    = "购物车内没有添加商品,请先购物!";
     }
 }