예제 #1
0
 public void Save()
 {
     if (listItem.Count > 0)
     {
         ObjectCookies <List <CartItem> > .SetValue(cKey, listItem);
     }
     else
     {
         ObjectCookies <List <CartItem> > .Remove(cKey);
     }
 }
예제 #2
0
        public Cart(string service_name)
        {
            cKey += service_name;

            if (ObjectCookies <List <CartItem> > .Exists(cKey))
            {
                listItem = ObjectCookies <List <CartItem> > .GetValue(cKey);
            }

            if (listItem == null)
            {
                listItem = new List <CartItem>();
            }
        }