Esempio n. 1
0
 public static int AddShippingAddress(ShippingAddressInfo shippingAddress)
 {
     ShippingAddressDao dao = new ShippingAddressDao();
     int shippingId = dao.AddShippingAddress(shippingAddress);
     if (dao.SetDefaultShippingAddress(shippingId, Globals.GetCurrentMemberUserId()))
     {
         return 1;
     }
     return 0;
 }
Esempio n. 2
0
 public static ShippingAddressInfo GetDefaultShippingAddress()
 {
     IList<ShippingAddressInfo> shippingAddresses = new ShippingAddressDao().GetShippingAddresses(Globals.GetCurrentMemberUserId());
     foreach (ShippingAddressInfo info in shippingAddresses)
     {
         if (info.IsDefault)
         {
             return info;
         }
     }
     return null;
 }