コード例 #1
0
ファイル: LzHandle.cs プロジェクト: lzh0509lzh/SAshop
        /// <summary>
        /// 展示用户收货地址
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public string GetAddressListByUserid(string UserId)
        {
            string strJson = "";

            Entity.DataResponse_useraddress Response = new Entity.DataResponse_useraddress();
            BLL.useraddress useraddress_BLL          = new useraddress();

            try
            {
                Response.List   = useraddress_BLL.GetAddressListByUserid(UserId);
                Response.Result = true;
                Response.Msg    = "";
            }
            catch (Exception ex)
            {
                string r = ex.ToString();
                Response.Result = false;
                Response.Msg    = "数据异常!";
            }
            strJson = Newtonsoft.Json.JsonConvert.SerializeObject(Response);
            return(strJson);
        }
コード例 #2
0
ファイル: LzHandle.cs プロジェクト: lzh0509lzh/SAshop
        /// <summary>
        /// 修改收货地址
        /// </summary>
        /// <param name="MJson"></param>
        /// <returns></returns>
        public string UpdateAll(string MJson)
        {
            string strJson = "";

            Entity.BaseDataResponse Response        = new Entity.BaseDataResponse();
            BLL.useraddress         useraddress_BLL = new useraddress();

            try
            {
                Entity.useraddress model = Newtonsoft.Json.JsonConvert.DeserializeObject <Entity.useraddress>(MJson);
                useraddress_BLL.UpdateAll(model.AddressID.ToString(), model.PerMobile, model.PerName, model.Address, model.StateId.ToString());
                Response.Result = true;
                Response.Msg    = "";
            }
            catch (Exception ex)
            {
                string r = ex.ToString();
                Response.Result = false;
                Response.Msg    = "数据异常!";
            }
            strJson = Newtonsoft.Json.JsonConvert.SerializeObject(Response);
            return(strJson);
        }