/// <summary> /// 查询客户地址 /// </summary> /// <returns></returns> public ActionResult GetAddressList() { string CompanyID = WebUtil.GetFormValue <string>("CompanyID"); string CustomerSN = WebUtil.GetFormValue <string>("CustomerSN"); CustomerProvider provider = new CustomerProvider(CompanyID); List <CusAddressEntity> list = provider.GetAddressList(CustomerSN); DataListResult <CusAddressEntity> result = new DataListResult <CusAddressEntity>() { Code = (int)EResponseCode.Success, Message = "响应成功", Result = list }; return(Content(JsonHelper.SerializeObject(result))); }
public ActionResult GetSelectAddress() { string CusNum = WebUtil.GetFormValue <string>("CusNum", string.Empty); List <CusAddressEntity> list = null; if (!CusNum.IsEmpty()) { CustomerProvider provider = new CustomerProvider(); list = provider.GetAddressList(CusNum); } list = list == null ? new List <CusAddressEntity>() : list; string json = ConvertJson.ListToJson <CusAddressEntity>(list, "List"); this.ReturnJson.AddProperty("Data", new JsonObject(json)); return(Content(this.ReturnJson.ToString())); }