Exemplo n.º 1
0
        public dynamic AddCustomerAddress()
        {
            int           serial     = Fun.Form("serial", 0);
            int           customerId = Fun.Form("customerId", 0);
            string        person     = Fun.Form("person");
            string        phone      = Fun.Form("phone");
            string        address    = Fun.Form("address");
            CustomerBLL   bll        = new CustomerBLL();
            C_AddressInfo addr       = null;

            if (serial > 0)
            {
                addr = bll.GetCustomerAddressDefault(customerId);
            }
            if (bll.AddCustomerAddress(customerId, person, phone, address, serial))
            {
                if (serial > 0 && addr != null)
                {
                    if (bll.UpdateCustomerAddressDefault(addr.addr_id, 0))
                    {
                        return("成功");
                    }
                    else
                    {
                        return("失败");
                    }
                }
                return("成功");
            }
            else
            {
                return("失败");
            }
        }