예제 #1
0
 protected void gvCart_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "RemoveItem")
     {
         CartHandler.RemoveItemFromCart(HttpContext.Current.User.Identity.Name, e.CommandArgument.ToString());
         gvCart.DataSource = CartHandler.GetCartByUser(HttpContext.Current.User.Identity.Name);
         gvCart.DataBind();
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         gvCart.DataSource = CartHandler.GetCartByUser(HttpContext.Current.User.Identity.Name);
         gvCart.DataBind();
         LbCount.Text = BusinessLayer.CartHandler.GetCartItemCount(HttpContext.Current.User.Identity.Name).ToString();
     }
 }