protected void Page_Load(object sender, EventArgs e) { try { int recordCount; string type = ConvertUtility.Trim(Request.QueryString["type"]); string estateId = ConvertUtility.Trim(Request.QueryString["code"]); this.EstateId = estateId; this.PageSize = AppSettings.PageSize; EstateCmService estateService = new EstateCmService(); EstateCm estate = estateService.GetEstateById(this.EstateId); this.TitleBar = estate.ToNavBar(false); BuildCmService buildService = new BuildCmService(); ComparedEstateType comparedEstate = estateService.GetComparedEstate(estateId); if (comparedEstate != null) { this.ComparedBuildCollection = buildService.ListComparedBuild(comparedEstate, 1, this.PageSize, out recordCount); } else { this.BuildCollection = buildService.ListBuild(this.EstateId, 1, this.PageSize, out recordCount); } this.RecordCount = recordCount; } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { try { string httpMethod = Request.HttpMethod; string estateId = ConvertUtility.Trim(Request.QueryString["id"]); if (httpMethod.Equals("get", StringComparison.OrdinalIgnoreCase)) { EstateCmService estateService = new EstateCmService(); this.Estate = estateService.GetEstateById(estateId); } else { //AddData string buildName = ConvertUtility.Trim(Request.Form["buildName"]); BuildCtService buildService = new BuildCtService(); if (buildService.AddBuild(estateId, buildName, this.UserInfo.UserId)) { Response.Write("true"); } else { Response.Write("false"); } Response.End(); } } catch (Exception ex) { throw ex; } }
static void CompareEstate(string agencyCom_EstateId) { Console.WriteLine("时间 : [{0}], 比较楼盘 [{1}]", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), agencyCom_EstateId); EstateCmService estateCmService = new EstateCmService(); EstateCmType agencyComEstate = estateCmService.GetEstateById(agencyCom_EstateId); EstateFwService estateFwService = new EstateFwService(); EstateFwType frameworkEstate = estateFwService.GetEstateByCm(agencyCom_EstateId); estateCmService.InsertComparedEstate(agencyComEstate, frameworkEstate, ComparedStatus.DEFAULT); CompareBuild(agencyCom_EstateId); }
private string GetTitleBar(string type, string code) { string titleBar = string.Empty; string searchMenu = string.Empty; switch (type) { case Architectures.CITY: { City city = new City(code); titleBar = city.ToNavBar(false); break; } case Architectures.REGION: { Region region = new Region(code); titleBar = region.ToNavBar(false); break; } case Architectures.SCOPE: { Scope scope = new Scope(code); titleBar = scope.ToNavBar(false); break; } case Architectures.BIGESTATE: { EstateCmService estateService = new EstateCmService(); EstateCm estate = estateService.GetEstateById(code); titleBar = estate.ToNavBar(false); break; } default: break; } return(titleBar); }