public ActionResult GetFormJson(string keyValue) { var data = areaCache.GetEntity(keyValue); return(Content(data.TryToJson())); }
public ActionResult GetCustomerEntityJson(string keyValue) { if (!string.IsNullOrWhiteSpace(keyValue)) { var data = customerBLL.GetEntity(keyValue); return(Success("通过", new { data.CustomerId, data.EnCode, data.FullName, data.ShortName, data.CustIndustryId, CustIndustryName = dataItemCache.GetDataItemValue(data.CustIndustryId), data.CustTypeId, CustTypeName = dataItemCache.GetDataItemValue(data.CustTypeId), data.CustLevelId, CustLevelName = dataItemCache.GetDataItemValue(data.CustLevelId), data.CustDegreeId, CustDegreeName = dataItemCache.GetDataItemValue(data.CustDegreeId), data.ProvinceId, ProvinceName = areaCache.GetEntity(data.ProvinceId), data.CityId, CityName = areaCache.GetEntity(data.CityId), data.CountyId, CountyName = areaCache.GetEntity(data.CountyId), data.Contact, data.PostId, data.Mobile, data.CompanyDesc, data.CompanyAddress, data.County, data.EstablishDate, data.NatureCode, data.RegisterCapital, data.SalesRevenue, data.CompanySize })); } else { return(Success("", new { CustomerId = string.Empty, EnCode = string.Empty, FullName = string.Empty, ShortName = string.Empty, CustIndustryId = string.Empty, CustIndustryName = string.Empty, CustTypeId = string.Empty, CustTypeName = string.Empty, CustLevelId = string.Empty, CustLevelName = string.Empty, CustDegreeId = string.Empty, CustDegreeName = string.Empty, ProvinceId = string.Empty, ProvinceName = new AreaEntity { AreaName = string.Empty }, CityId = string.Empty, CityName = new AreaEntity { AreaName = string.Empty }, CountyId = string.Empty, CountyName = new AreaEntity { AreaName = string.Empty }, Contact = string.Empty, PostId = string.Empty, Mobile = string.Empty, CompanyDesc = string.Empty, CompanyAddress = string.Empty, County = string.Empty, EstablishDate = string.Empty, NatureCode = string.Empty, RegisterCapital = string.Empty, SalesRevenue = string.Empty, CompanySize = string.Empty })); } }