示例#1
0
 //清空购物车
 protected void BtnClearAll_Click(object sender, EventArgs e)
 {
     if (Session["UserId"] != null)
     {
         int uid = int.Parse(Session["UserId"].ToString());
         if (!cartService.IsCartItemEmptyByUserId(uid))
         {
             cartService.ClearCartItemByUserId(uid);
             Response.Write("<script>window.location.href='ProCart.aspx'</script>");
         }
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }