Exemple #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);
        }
Exemple #2
0
        /// <summary>
        /// 增加代理商的收货地址
        /// </summary>
        /// <param name="shippingAddress"></param>
        /// <returns></returns>
        public static int AddAgentShippingAddress(ShippingAddressInfo shippingAddress)
        {
            ShippingAddressDao dao = new ShippingAddressDao();
            int shippingId         = dao.AddShippingAddress(shippingAddress);

            if (dao.SetDefaultShippingAddress(shippingId, shippingAddress.UserId))
            {
                return(1);
            }
            return(0);
        }
Exemple #3
0
        public static int AddShippingAddress(ShippingAddressInfo shippingAddress)
        {
            ShippingAddressDao dao  = new ShippingAddressDao();
            MemberDao          dao2 = new MemberDao();
            int shippingId          = dao.AddShippingAddress(shippingAddress);

            if (dao.SetDefaultShippingAddress(shippingId, Globals.GetCurrentMemberUserId(false)))
            {
                dao2.SaveMemberInfoByAddress(shippingAddress);
                return(1);
            }
            return(0);
        }
        public static int AddShippingAddress(ShippingAddressInfo shippingAddress)
        {
            ShippingAddressDao shippingAddressDao = new ShippingAddressDao();
            MemberDao          memberDao          = new MemberDao();
            int shippingId = shippingAddressDao.AddShippingAddress(shippingAddress);
            int result;

            if (shippingAddressDao.SetDefaultShippingAddress(shippingId, Globals.GetCurrentMemberUserId(false)))
            {
                memberDao.SaveMemberInfoByAddress(shippingAddress);
                result = 1;
            }
            else
            {
                result = 0;
            }
            return(result);
        }