public static List <SYSCode> GetSYSCodeById(int id, FxtAPIClientExtend _fxtApi = null) { List <SYSCode> list = new List <SYSCode>(); FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi); try { string name = "GetSYSCodeByID"; var para = new { id = id }; string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi)); if (string.IsNullOrEmpty(jsonStr)) { fxtApi.Abort(); return(new List <SYSCode>()); } list = JsonHelp.ParseJSONList <SYSCode>(jsonStr); list.DecodeField <SYSCode>(); fxtApi.Abort(); } catch (Exception ex) { fxtApi.Abort(); log.Error("GetSYSCodeById(int id,FxtAPIClientExtend _fxtApi = null)", ex); } return(list); }
public static List <CAS.Entity.DBEntity.DATProject> GetProjectInfo(int cityId, int projectid, string username, string signname, List <UserCenter_Apps> appList) { var para = new { cityid = cityId, projectid = projectid }; DataCenterResult result = Common.PostDataCenter(username, signname, Common.gpdinfo, para, appList); List <CAS.Entity.DBEntity.DATProject> entity = new List <CAS.Entity.DBEntity.DATProject>(); if (!string.IsNullOrEmpty(result.data)) { entity = JsonHelp.ParseJSONList <CAS.Entity.DBEntity.DATProject>(result.data); } return(entity); }
public static List <CAS.Entity.DBEntity.DATProject> GetProjectBuildingHouse(int cityId, string proujectIds, string username, string signname, List <UserCenter_Apps> appList) { var para = new { cityid = cityId, projectids = proujectIds }; DataCenterResult result = Common.PostDataCenter(username, signname, Common.getprojectbuildinghouselist, para, appList); List <CAS.Entity.DBEntity.DATProject> list = new List <CAS.Entity.DBEntity.DATProject>(); if (!string.IsNullOrEmpty(result.data)) { list = JsonHelp.ParseJSONList <CAS.Entity.DBEntity.DATProject>(result.data); } return(list); }
/// <summary> /// 获取所有城市 /// </summary> /// <param name="_fxtApi"></param> /// <returns></returns> public static List <FxtApi_SYSCity> GetAllCity(FxtAPIClientExtend _fxtApi = null) { List <FxtApi_SYSCity> list = new List <FxtApi_SYSCity>(); FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi); try { string name = "GetAllCity"; string jsonStr = Convert.ToString(EntranceApi.Entrance(name, "", _fxtApi: fxtApi)); if (string.IsNullOrEmpty(jsonStr)) { fxtApi.Abort(); return(null); } list = JsonHelp.ParseJSONList <FxtApi_SYSCity>(jsonStr); fxtApi.Abort(); } catch (Exception ex) { fxtApi.Abort(); log.Error("GetAllCity()", ex); } return(list); }
public static List <FxtApi_DATProjectView> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_DATProjectView>(json)); }
public static List <FxtApi_PriviCompanyShowData> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_PriviCompanyShowData>(json)); }
/// <summary> /// /// </summary> /// <param name="_list"></param> /// <param name="caseIds">输出过滤掉的案例ID</param> /// <returns></returns> public static bool 发布需要整理的数据到服务器(List <VIEW_案例信息_城市表_网站表> _list, out List <案例库上传信息过滤表> 过滤信息, out Dictionary <long, int> 原始库ID对应成功的房讯通ID, FxtAPIClientExtend _fxtApi = null) { 原始库ID对应成功的房讯通ID = new Dictionary <long, int>(); 过滤信息 = new List <案例库上传信息过滤表>(); string json = ""; string nowIp = WcfCheck.GetWcfCheckIp(); string validate = WcfCheck.GetWcfCheckValidData(); if (_list == null || _list.Count < 1) { return(true); } FxtAPIClientExtend fxtServer = new FxtAPIClientExtend(_fxtApi); try { json = _list.FxtApi_GetJson(); if (string.IsNullOrEmpty(json)) { fxtServer.Abort(); return(true); } string name = "SpiderExport"; var para = new { data = json }; string jsonStr = Convert.ToString(EntranceApi.Entrance_FxtSpider(name, para.ToJSONjss(), _fxtApi: fxtServer)); List <SpiderExportResult> list = JsonHelp.ParseJSONList <SpiderExportResult>(jsonStr); foreach (SpiderExportResult obj in list) { if (obj.Success.ToLower().Equals("false")) { VIEW_案例信息_城市表_网站表 obj2 = _list.Find(delegate(VIEW_案例信息_城市表_网站表 _obj2) { return(_obj2.ID == Convert.ToInt64(obj.ID)); }); if (obj2 != null) { int 错误类型ID = StaticValue.其他_ID; string 错误说明 = ""; if (obj.Remark.Equals(SpiderExportResult.Remark_楼盘名不存在)) { 错误类型ID = StaticValue.楼盘名不存在_ID; 错误说明 = "楼盘名不存在"; } else if (obj.Remark.Equals(SpiderExportResult.Remark_系统异常)) { 错误类型ID = StaticValue.系统异常_ID; 错误说明 = "系统异常"; } else { 错误类型ID = StaticValue.其他_ID; 错误说明 = obj.Remark; } 案例库上传信息过滤表 obj3 = new 案例库上传信息过滤表 { 案例ID = obj2.ID, 城市ID = obj2.城市ID, 网站ID = obj2.网站ID, 错误类型ID = 错误类型ID, 错误说明 = 错误说明, 过滤时间 = DateTime.Now }; 过滤信息.Add(obj3); } } else { 原始库ID对应成功的房讯通ID.Add(Convert.ToInt64(obj.ID), obj.FxtId); } } fxtServer.Abort(); } catch (Exception ex) { log.Error("发布需要整理的数据到服务器(List<VIEW_案例信息_城市表_网站表> _list, out List<案例库上传信息过滤表> 过滤信息,out Dictionary<long,int> 原始库ID对应成功的房讯通ID)", ex); fxtServer.Abort(); return(false); } return(true); }
/// <summary> /// 导入楼盘+楼栋+房号数据到运维中心 /// </summary> /// <param name="project"></param> /// <param name="lnkComList"></param> /// <param name="lnkpaList"></param> /// <param name="buildingList"></param> /// <param name="houseList"></param> /// <param name="username"></param> /// <param name="signname"></param> /// <param name="appList"></param> /// <param name="message"></param> /// <returns></returns> public static int ImportProjectData(Project project, List <PCompany> lnkComList, List <PAppendage> lnkpaList, List <Building> buildingList, ref List <Building> resultBuilding, List <HouseDetails> houseList, string username, string signname, List <UserCenter_Apps> appList, out string message) { message = ""; int projectId = 0; JObject jobj = new JObject(); #region (楼盘信息) jobj.Add(new JProperty("x", project.X)); jobj.Add(new JProperty("y", project.Y)); jobj.Add(new JProperty("projectname", project.ProjectName.TrimBlank().EncodeField())); jobj.Add(new JProperty("cityid", project.CityID)); jobj.Add(new JProperty("areaid", project.AreaID)); jobj.Add(new JProperty("address", project.Address.EncodeField())); jobj.Add(new JProperty("enddate", project.EndDate)); jobj.Add(new JProperty("east", project.East.EncodeField())); jobj.Add(new JProperty("west", project.West.EncodeField())); jobj.Add(new JProperty("south", project.South.EncodeField())); jobj.Add(new JProperty("north", project.North.EncodeField())); //jobj.Add(new JProperty("buildingarea", project.BuildingArea)); //jobj.Add(new JProperty("landarea", project.LandArea)); //jobj.Add(new JProperty("cubagerate", project.CubageRate)); //jobj.Add(new JProperty("greenrate", project.GreenRate)); //jobj.Add(new JProperty("managerprice", project.ManagerPrice.EncodeField())); jobj.Add(new JProperty("parkingnumber", project.ParkingNumber)); //jobj.Add(new JProperty("saledate", project.SaleDate)); //jobj.Add(new JProperty("buildingdate", project.BuildingDate)); jobj.Add(new JProperty("detail", project.Detail.EncodeField())); jobj.Add(new JProperty("fxtprojectid", project.FxtProjectId)); jobj.Add(new JProperty("fxtcompanyid", project.FxtCompanyId)); jobj.Add(new JProperty("valid", 1)); jobj.Add(new JProperty("othername", project.OtherName)); jobj.Add(new JProperty("subareaid", project.SubAreaId)); jobj.Add(new JProperty("purposecode", project.PurposeCode)); jobj.Add(new JProperty("rightcode", project.RightCode)); jobj.Add(new JProperty("buildingnum", project.BuildingNum)); jobj.Add(new JProperty("totalnum", project.TotalNum)); jobj.Add(new JProperty("managerquality", project.ManagerQuality)); //jobj.Add(new JProperty("parkingstatus", project.ParkingStatus)); jobj.Add(new JProperty("creator", project.Creator)); jobj.Add(new JProperty("updatedatetime", project.UpdateDateTime)); jobj.Add(new JProperty("saveuser", project.SaveUser)); jobj.Add(new JProperty("savedatetime", project.SaveDateTime)); #endregion //楼盘关联公司 jobj.Add(new JProperty("companylist", JArray.Parse(Common.ConvertToJson(lnkComList)))); //楼盘配套 jobj.Add(new JProperty("appendage", JArray.Parse(lnkpaList.ToJSONjss()))); //楼栋+房号信息 JArray buildingArry = new JArray(); foreach (Building building in buildingList) { JObject buildingObj = new JObject(); #region (楼栋信息) buildingObj.Add(new JProperty("buildingid", building.BuildingId)); buildingObj.Add(new JProperty("buildingname", building.BuildingName.EncodeField())); //buildingObj.Add(new JProperty("doorplate", building.Doorplate.EncodeField())); buildingObj.Add(new JProperty("othername", building.OtherName.EncodeField())); buildingObj.Add(new JProperty("structurecode", building.StructureCode)); buildingObj.Add(new JProperty("locationcode", building.LocationCode)); //buildingObj.Add(new JProperty("averageprice", building.AveragePrice)); buildingObj.Add(new JProperty("builddate", building.BuildDate)); buildingObj.Add(new JProperty("iselevator", building.IsElevator)); buildingObj.Add(new JProperty("elevatorrate", building.ElevatorRate.EncodeField())); //buildingObj.Add(new JProperty("pricedetail", building.PriceDetail.EncodeField())); buildingObj.Add(new JProperty("remark", building.Remark.EncodeField())); buildingObj.Add(new JProperty("fxtbuildingid", building.FxtBuildingId)); //buildingObj.Add(new JProperty("sightcode", building.SightCode)); buildingObj.Add(new JProperty("totalfloor", building.TotalFloor)); buildingObj.Add(new JProperty("fxtcompanyid", building.FxtCompanyId)); buildingObj.Add(new JProperty("cityid", building.CityID)); buildingObj.Add(new JProperty("purposecode", building.PurposeCode)); buildingObj.Add(new JProperty("maintenancecode", building.MaintenanceCode)); buildingObj.Add(new JProperty("creator", building.Creator)); buildingObj.Add(new JProperty("saveuser", building.SaveUser)); buildingObj.Add(new JProperty("x", building.X)); buildingObj.Add(new JProperty("y", building.Y)); #endregion JArray houseArry = new JArray(); #region (房号信息) List <HouseDetails> _houseList = houseList.Where(obj => obj.BuildingId == building.BuildingId).ToList(); foreach (HouseDetails house in _houseList) { JObject houseObj = new JObject(); houseObj.Add(new JProperty("fxtcompanyid", house.FxtCompanyId)); houseObj.Add(new JProperty("cityid", house.CityID)); houseObj.Add(new JProperty("unitno", (house.UnitNo + house.RoomNo).EncodeField())); houseObj.Add(new JProperty("floorno", house.FloorNo)); //houseObj.Add(new JProperty("endfloorno", house.EndFloorNo)); houseObj.Add(new JProperty("housename", house.HouseName.EncodeField())); houseObj.Add(new JProperty("frontcode", house.FrontCode)); houseObj.Add(new JProperty("buildarea", house.BuildArea)); houseObj.Add(new JProperty("housetypecode", house.HouseTypeCode)); houseObj.Add(new JProperty("remark", house.Remark.EncodeField())); houseObj.Add(new JProperty("fxthouseid", house.FxtHouseId)); houseObj.Add(new JProperty("sightcode", house.SightCode)); houseObj.Add(new JProperty("purposecode", house.PurposeCode)); houseObj.Add(new JProperty("vdcode", house.VDCode)); houseObj.Add(new JProperty("structurecode", house.StructureCode)); houseObj.Add(new JProperty("noisecode", house.NoiseCode)); houseObj.Add(new JProperty("creator", house.Creator)); houseObj.Add(new JProperty("saveuser", house.SaveUser)); houseArry.Add(houseObj); } buildingObj.Add(new JProperty("houselist", houseArry)); #endregion buildingArry.Add(buildingObj); } jobj.Add(new JProperty("buildinglist", buildingArry)); string dataJson = jobj.ToJSONjss(); var para = new { data = dataJson }; DataCenterResult result = Common.PostDataCenter(username, signname, Common.importprojectdata, para, appList); if (!string.IsNullOrEmpty(result.data)) { JObject _jobj = JObject.Parse(result.data); projectId = _jobj.Value <int>("projectid"); message = _jobj.Value <string>("message"); var buildingids = _jobj["buildingids"].ToString(); if (!buildingids.IsNullOrEmpty()) { var buildingidList = JsonHelp.ParseJSONList <Building>(buildingids); resultBuilding = buildingidList; } } return(projectId); }
public static List <FxtApi_ProjectJoinPurposeTypeJoinVillaCaseCount> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_ProjectJoinPurposeTypeJoinVillaCaseCount>(json)); }
public static List <FxtApi_SYSCode> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_SYSCode>(json)); }
/// <summary> /// 导入楼盘+楼栋+房号数据到运维中心 /// </summary> /// <param name="project"></param> /// <param name="lnkComList"></param> /// <param name="lnkpaList"></param> /// <param name="buildingList"></param> /// <param name="houseList"></param> /// <param name="username"></param> /// <param name="signname"></param> /// <param name="appList"></param> /// <param name="message"></param> /// <returns></returns> public static int ImportProjectData(Project project, ref List <Building> resultBuilding, string username, string signname, List <Apps> appList, out string message) { //string dataJson = project.ToJSONjss(); message = ""; int projectId = 0; JObject jobj = new JObject(); PropertyInfo[] buildingPropertys = typeof(Building).GetProperties(); PropertyInfo[] housePropertys = typeof(HouseDetails).GetProperties(); //所有字段 var fields = project.Templet.FieldGroups.SelectMany(m => m.Fields).ToList(); if (fields != null && fields.Count > 0) { //获取实体属性 var propertys = project.GetType().GetProperties(); foreach (var field in fields) { var property = propertys.Where(pInfo => pInfo.Name == field.FieldName).FirstOrDefault(); if (property != null) { jobj.Add(new JProperty(field.FieldName.ToLower(), property.GetValue(project))); } } //楼栋 JArray buildingArry = new JArray(); if (project.Buildings != null && project.Buildings.Count > 0) { foreach (Building building in project.Buildings) { //楼栋字段 var buildingFields = building.Templet.FieldGroups.SelectMany(m => m.Fields); if (buildingFields != null && buildingFields.Count() > 0) { //楼栋字段取值 JObject buildingObj = new JObject(); foreach (var buildingField in buildingFields) { var property = buildingPropertys.Where(pInfo => pInfo.Name == buildingField.FieldName).FirstOrDefault(); if (property != null) { buildingObj.Add(new JProperty(buildingField.FieldName.ToLower(), property.GetValue(building))); } } //房号 JArray houseArry = new JArray(); if (building.HouseDetails != null && building.HouseDetails.Count > 0) { foreach (var house in building.HouseDetails) { //房号字段 //var houseFields = house.Templet.FieldGroups.SelectMany(m => m.Fields); //if (houseFields != null && houseFields.Count() > 0) //{ //房号字段取值 JObject houseObj = new JObject(); //foreach (var houseField in houseFields) //{ //var property = housePropertys.Where(pInfo => pInfo.Name == houseField.FieldName).FirstOrDefault(); //houseObj.Add(new JProperty(houseField.FieldName, property.GetValue(house))); //} foreach (var houseProperty in housePropertys) { if (houseProperty.Name == "Building" || houseProperty.Name == "House" || houseProperty.Name == "Id" || houseProperty.Name == "HouseId" || houseProperty.Name == "BuildingId" || houseProperty.Name == "CreateTime" || houseProperty.Name == "SaveDateTime") { continue; } houseObj.Add(new JProperty(houseProperty.Name.ToLower(), houseProperty.GetValue(house))); } houseArry.Add(houseObj); //} } } buildingObj.Add(new JProperty("houselist", houseArry)); buildingObj.Add(new JProperty("cityid", building.CityID)); buildingObj.Add(new JProperty("buildingid", building.BuildingId)); buildingObj.Add(new JProperty("fxtbuildingid", building.FxtBuildingId)); buildingObj.Add(new JProperty("fxtcompanyid", building.FxtCompanyId)); buildingObj.Add(new JProperty("saveuser", building.SaveUser)); //buildingObj.Add(new JProperty("savedatetime", building.SaveDateTime)); buildingObj.Add(new JProperty("creator", building.Creator)); //buildingObj.Add(new JProperty("createtime", building.CreateTime)); buildingArry.Add(buildingObj); } } } jobj.Add(new JProperty("buildinglist", buildingArry)); jobj.Add(new JProperty("cityid", project.CityID)); jobj.Add(new JProperty("fxtprojectid", project.FxtProjectId)); jobj.Add(new JProperty("fxtcompanyid", project.FxtCompanyId)); jobj.Add(new JProperty("saveuser", project.SaveUser)); //jobj.Add(new JProperty("savedatetime", project.SaveDateTime)); //jobj.Add(new JProperty("updatedatetime", project.UpdateDateTime)); jobj.Add(new JProperty("creator", project.Creator)); //jobj.Add(new JProperty("createtime", project.CreateTime)); } #region (楼盘信息) //jobj.Add(new JProperty("x", project.X)); //jobj.Add(new JProperty("y", project.Y)); //jobj.Add(new JProperty("projectname", project.ProjectName.TrimBlank().EncodeField())); //jobj.Add(new JProperty("cityid", project.CityID)); //jobj.Add(new JProperty("areaid", project.AreaID)); //jobj.Add(new JProperty("address", project.Address.EncodeField())); //jobj.Add(new JProperty("enddate", project.EndDate)); //jobj.Add(new JProperty("east", project.East.EncodeField())); //jobj.Add(new JProperty("west", project.West.EncodeField())); //jobj.Add(new JProperty("south", project.South.EncodeField())); //jobj.Add(new JProperty("north", project.North.EncodeField())); ////jobj.Add(new JProperty("buildingarea", project.BuildingArea)); ////jobj.Add(new JProperty("landarea", project.LandArea)); ////jobj.Add(new JProperty("cubagerate", project.CubageRate)); ////jobj.Add(new JProperty("greenrate", project.GreenRate)); ////jobj.Add(new JProperty("managerprice", project.ManagerPrice.EncodeField())); //jobj.Add(new JProperty("parkingnumber", project.ParkingNumber)); ////jobj.Add(new JProperty("saledate", project.SaleDate)); ////jobj.Add(new JProperty("buildingdate", project.BuildingDate)); //jobj.Add(new JProperty("detail", project.Detail.EncodeField())); //jobj.Add(new JProperty("fxtprojectid", project.FxtProjectId)); //jobj.Add(new JProperty("fxtcompanyid", project.FxtCompanyId)); //jobj.Add(new JProperty("valid", 1)); //jobj.Add(new JProperty("othername", project.OtherName)); //jobj.Add(new JProperty("subareaid", project.SubAreaId)); //jobj.Add(new JProperty("purposecode", project.PurposeCode)); //jobj.Add(new JProperty("rightcode", project.RightCode)); //jobj.Add(new JProperty("buildingnum", project.BuildingNum)); //jobj.Add(new JProperty("totalnum", project.TotalNum)); //jobj.Add(new JProperty("managerquality", project.ManagerQuality)); ////jobj.Add(new JProperty("parkingstatus", project.ParkingStatus)); //jobj.Add(new JProperty("creator", project.Creator)); //jobj.Add(new JProperty("updatedatetime", project.UpdateDateTime)); //jobj.Add(new JProperty("saveuser", project.SaveUser)); //jobj.Add(new JProperty("savedatetime", project.SaveDateTime)); #endregion #region 楼盘关联公司 JArray companyArray = new JArray(); if (project.Companys != null) { var companys = project.Companys.Select(m => new { projectid = m.ProjectId, companyname = m.CompanyName, companytype = m.CompanyType, cityid = m.CityId }); companyArray = JArray.Parse(companys.ToJSONjss()); } jobj.Add(new JProperty("companylist", companyArray)); //jobj.Add(new JProperty("companylist", JArray.Parse(Common.ConvertToJson(lnkComList)))); #endregion #region 楼盘配套 JArray appendageArray = new JArray(); if (project.Appendages != null) { var appendages = project.Appendages.Select(m => new { address = m.Address, appendagecode = m.AppendageCode, area = m.Area, cityid = m.CityId, classcode = m.ClassCode, distance = m.Distance, id = m.Id, isinner = m.IsInner, p_aname = m.P_AName, projectid = m.ProjectId, uid = m.Uid, x = m.X, y = m.Y }); appendageArray = JArray.Parse(appendages.ToJSONjss()); } jobj.Add(new JProperty("appendage", appendageArray)); //jobj.Add(new JProperty("appendage", JArray.Parse(lnkpaList.ToJSONjss(false)))); #endregion //楼栋+房号信息 //JArray buildingArry = new JArray(); //foreach (Building building in buildingList) //{ // JObject buildingObj = new JObject(); // #region(楼栋信息) // buildingObj.Add(new JProperty("buildingid", building.BuildingId)); // buildingObj.Add(new JProperty("buildingname", building.BuildingName.EncodeField())); // //buildingObj.Add(new JProperty("doorplate", building.Doorplate.EncodeField())); // buildingObj.Add(new JProperty("othername", building.OtherName.EncodeField())); // buildingObj.Add(new JProperty("structurecode", building.StructureCode)); // buildingObj.Add(new JProperty("locationcode", building.LocationCode)); // //buildingObj.Add(new JProperty("averageprice", building.AveragePrice)); // buildingObj.Add(new JProperty("builddate", building.BuildDate)); // buildingObj.Add(new JProperty("iselevator", building.IsElevator)); // buildingObj.Add(new JProperty("elevatorrate", building.ElevatorRate.EncodeField())); // //buildingObj.Add(new JProperty("pricedetail", building.PriceDetail.EncodeField())); // buildingObj.Add(new JProperty("remark", building.Remark.EncodeField())); // buildingObj.Add(new JProperty("fxtbuildingid", building.FxtBuildingId)); // //buildingObj.Add(new JProperty("sightcode", building.SightCode)); // buildingObj.Add(new JProperty("totalfloor", building.TotalFloor)); // buildingObj.Add(new JProperty("fxtcompanyid", building.FxtCompanyId)); // buildingObj.Add(new JProperty("cityid", building.CityID)); // buildingObj.Add(new JProperty("purposecode", building.PurposeCode)); // buildingObj.Add(new JProperty("maintenancecode", building.MaintenanceCode)); // buildingObj.Add(new JProperty("creator", building.Creator)); // buildingObj.Add(new JProperty("saveuser", building.SaveUser)); // buildingObj.Add(new JProperty("x", building.X)); // buildingObj.Add(new JProperty("y", building.Y)); // #endregion // JArray houseArry = new JArray(); // #region (房号信息) // List<HouseDetails> _houseList = houseList.Where(obj => obj.BuildingId == building.BuildingId).ToList(); // foreach (HouseDetails house in _houseList) // { // JObject houseObj = new JObject(); // houseObj.Add(new JProperty("fxtcompanyid", house.FxtCompanyId)); // houseObj.Add(new JProperty("cityid", house.CityID)); // houseObj.Add(new JProperty("unitno", (house.UnitNo + house.RoomNo).EncodeField())); // houseObj.Add(new JProperty("floorno", house.FloorNo)); // //houseObj.Add(new JProperty("endfloorno", house.EndFloorNo)); // houseObj.Add(new JProperty("housename", house.HouseName.EncodeField())); // houseObj.Add(new JProperty("frontcode", house.FrontCode)); // houseObj.Add(new JProperty("buildarea", house.BuildArea)); // houseObj.Add(new JProperty("housetypecode", house.HouseTypeCode)); // houseObj.Add(new JProperty("remark", house.Remark.EncodeField())); // houseObj.Add(new JProperty("fxthouseid", house.FxtHouseId)); // houseObj.Add(new JProperty("sightcode", house.SightCode)); // houseObj.Add(new JProperty("purposecode", house.PurposeCode)); // houseObj.Add(new JProperty("vdcode", house.VDCode)); // houseObj.Add(new JProperty("structurecode", house.StructureCode)); // houseObj.Add(new JProperty("noisecode", house.NoiseCode)); // houseObj.Add(new JProperty("creator", house.Creator)); // houseObj.Add(new JProperty("saveuser", house.SaveUser)); // houseArry.Add(houseObj); // } // buildingObj.Add(new JProperty("houselist", houseArry)); // #endregion // buildingArry.Add(buildingObj); //} //jobj.Add(new JProperty("buildinglist", buildingArry)); string dataJson = jobj.ToJSONjss(); var para = new { data = dataJson }; DataCenterResult result = Common.PostDataCenter(username, signname, Common.importprojectdata, para, appList); if (!string.IsNullOrEmpty(result.data)) { JObject _jobj = JObject.Parse(result.data); projectId = _jobj.Value <int>("projectid"); message = _jobj.Value <string>("message"); var buildingids = _jobj["buildingids"].ToString(); if (!buildingids.IsNullOrEmpty()) { var buildingidList = JsonHelp.ParseJSONList <Building>(buildingids); resultBuilding = buildingidList; } } //projectId = project.ProjectId; return(projectId); }
public static List <FxtApi_ProjectJoinBuildingTypeJoinAreaTypeJoinPublicCaseCount> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_ProjectJoinBuildingTypeJoinAreaTypeJoinPublicCaseCount>(json)); }
public static List <FxtApi_SYSProjectMatch> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_SYSProjectMatch>(json)); }
public static List <FxtApi_PublicResult> ConvertToObjList(string json) { return(JsonHelp.ParseJSONList <FxtApi_PublicResult>(json)); }