protected void Page_Load(object sender, EventArgs e) { string estateId = ConvertUtility.Trim(Request.QueryString["id"]); string httpMethod = Request.HttpMethod; EstateFwService estateService = new EstateFwService(); if (httpMethod.Equals("get", StringComparison.OrdinalIgnoreCase)) { this.Estate = estateService.GetEstateById(estateId); } else { string estateName = ConvertUtility.Trim(Request.Form["estateName"]); string address = ConvertUtility.Trim(Request.Form["address"]); if (estateService.Edit(estateId, estateName, address)) { Response.Write("true"); } else { Response.Write("false"); } Response.End(); } }
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); }
public static bool Complete(string id) { try { EstateFwService estateService = new EstateFwService(); bool effected = estateService.Completed(id); return(effected); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { try { EstateFwService estateService = new EstateFwService(); int recordCount; string type = ConvertUtility.Trim(Request.QueryString["type"]); string code = ConvertUtility.Trim(Request.QueryString["code"]); int pageIndex = ConvertUtility.ToInt(Request.QueryString["pageIndex"]); this.PageSize = AppSettings.PageSize; this.EstateCollection = estateService.GetEstateByType(type, code, pageIndex, 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)) { EstateFwService estateService = new EstateFwService(); this.Estate = estateService.GetEstateById(estateId); } else { //AddData string buildName = ConvertUtility.Trim(Request.Form["buildName"]); string address = ConvertUtility.Trim(Request.Form["address"]); int x_cnt = ConvertUtility.ToInt(Request.Form["x_cnt"]); bool x_except = ConvertUtility.ToBoolean(Request.Form["x_except"]); int y_cnt_b = ConvertUtility.ToInt(Request.Form["y_cnt_b"]); int y_cnt_e = ConvertUtility.ToInt(Request.Form["y_cnt_e"]); bool y_except = ConvertUtility.ToBoolean(Request.Form["y_except"]); BuildFwService buildService = new BuildFwService(); if (buildService.AddBuild(estateId, buildName, address, x_cnt, x_except, y_cnt_b, y_cnt_e, y_except)) { Response.Write("true"); } else { Response.Write("false"); } Response.End(); } } catch (Exception ex) { throw ex; } }
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; EstateFwService estateService = new EstateFwService(); EstateFw estate = estateService.GetEstateById(this.EstateId); this.TitleBar = estate.ToNavBar(false); BuildFwService buildService = new BuildFwService(); this.BuildCollection = buildService.ListBuild(this.EstateId, 1, this.PageSize, out recordCount); this.RecordCount = recordCount; } catch (Exception ex) { throw ex; } }
static void Estate_C2F_Ing(string estateId) { // DateTime begin = DateTime.Now; EstateCtService estateCtService = new EstateCtService(); EstateCtType estateCtType = estateCtService.GetEstateTypeById(estateId); EstateFwType estateFwType = new EstateFwType(estateCtType); EstateFwService estateFwService = new EstateFwService(); estateFwService.ImportEstate(estateFwType); BuildCtService buildCtService = new BuildCtService(); List <BuildCtType> buildType = buildCtService.ListBuild(estateId).ToList(); if (buildType != null && buildType.Count > 0) { buildType.ForEach(item => { Console.WriteLine("时间: {0}, 开始导入栋座[{1}]..", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), item.BuildName); Build_C2F(item); }); } DateTime end = DateTime.Now; }
protected void Page_Load(object sender, EventArgs e) { try { int recordCount; string type = ConvertUtility.Trim(Request.QueryString["type"]); string code = ConvertUtility.Trim(Request.QueryString["code"]); this.Type = type; this.Code = code; this.TitleBar = GetTitleBar(this.Type, this.Code); this.PageSize = AppSettings.PageSize; EstateFwService estateService = new EstateFwService(); IList <EstateFwType> estateCollection = estateService.GetEstateByType(this.Type, this.Code, 1, this.PageSize, out recordCount); this.RecordCount = recordCount; this.EstateCollection = new List <EstateFwType>(); this.EstateCollection = estateCollection; } 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)) { EstateFwService estateService = new EstateFwService(); this.Estate = estateService.GetEstateById(estateId); } else { //AddData string buildName1 = ConvertUtility.Trim(Request.Form["buildName_B"]); string buildName2 = ConvertUtility.Trim(Request.Form["buildName_E"]); string buildName = ConvertUtility.Trim(Request.Form["buildName"]); string address = ConvertUtility.Trim(Request.Form["address"]); int x_cnt = ConvertUtility.ToInt(Request.Form["x_cnt"]); bool x_except = ConvertUtility.ToBoolean(Request.Form["x_except"]); int y_cnt_b = ConvertUtility.ToInt(Request.Form["y_cnt_b"]); int y_cnt_e = ConvertUtility.ToInt(Request.Form["y_cnt_e"]); bool y_except = ConvertUtility.ToBoolean(Request.Form["y_except"]); BuildFwService buildService = new BuildFwService(); System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); byte[] b1 = encoding.GetBytes(buildName1.ToUpper()); byte[] b2 = encoding.GetBytes(buildName2.ToUpper()); int c = b2[0] - b1[0]; if (c >= 0 && b2[0] < 90 && b1[0] > 64) { for (int idx = b1[0]; idx <= b2[0]; idx++) { char[] name = encoding.GetChars(new byte[] { (byte)idx }); buildService.AddBuild(estateId, name[0].ToString() + buildName, address, x_cnt, x_except, y_cnt_b, y_cnt_e, y_except); } Response.Write("true"); } else { int buildName_B = ConvertUtility.ToInt(buildName1); int buildName_E = ConvertUtility.ToInt(buildName2); if (buildName_E >= buildName_B) { while (buildName_B <= buildName_E) { buildService.AddBuild(estateId, buildName_B + buildName, address, x_cnt, x_except, y_cnt_b, y_cnt_e, y_except); buildName_B++; if (buildName_B > buildName_E) { break; } } Response.Write("true"); } else { Response.Write("false"); } } Response.End(); } } catch (Exception ex) { throw ex; } }
static void OrderStatusMonitor() { EstateCmService estateCmService = new EstateCmService(); EstateCtService estateCtService = new EstateCtService(); List <EstateCtType> ctTypeCollection = estateCtService.ListOrderStatus(); if (ctTypeCollection != null && ctTypeCollection.Count > 0) { ctTypeCollection.ForEach(item => { switch (item.Flow) { case FlowStatus.COLLECTING: { Console.WriteLine("更新Order状态为[收集中--EstateId={0}]", item.AgencyCom_EstateId); estateCmService.UpdateOrderStatus(item.AgencyCom_EstateId, OrderStatus.COLLECTING); estateCtService.UpdateFlowStatus(item.EstateId, FlowStatus.COLLECTING_ORDERSTATUS); break; } case FlowStatus.COLLECTED: { Console.WriteLine("更新Order状态[收集完成--EstateId={0}]", item.AgencyCom_EstateId); estateCmService.UpdateOrderStatus(item.AgencyCom_EstateId, OrderStatus.COLLECTED); estateCtService.UpdateFlowStatus(item.EstateId, FlowStatus.COLLECTED_ORDERSTATUS); break; } default: { break; } } }); } EstateFwService estateFwService = new EstateFwService(); List <EstateFwType> fwTypeCollection = estateFwService.ListOrderStatus(); if (fwTypeCollection != null && fwTypeCollection.Count > 0) { fwTypeCollection.ForEach(item => { switch (item.Flow) { case FlowStatus.COLLECTING: { Console.WriteLine("更新Order状态[录入中--EstateId={0}]", item.AgencyCom_EstateId); estateCmService.UpdateOrderStatus(item.AgencyCom_EstateId, OrderStatus.FRAMEWORKING); estateFwService.UpdateFlowStatus(item.EstateId, FlowStatus.COLLECTING_ORDERSTATUS); break; } case FlowStatus.COLLECTED: { Console.WriteLine("更新Order状态[录入完成--EstateId={0}]", item.AgencyCom_EstateId); estateCmService.UpdateOrderStatus(item.AgencyCom_EstateId, OrderStatus.FRAMEWORKED); estateFwService.UpdateFlowStatus(item.EstateId, FlowStatus.COLLECTED_ORDERSTATUS); break; } case FlowStatus.EXPORTED: { Console.WriteLine("更新Order状态[比较完成--EstateId={0}]", item.AgencyCom_EstateId); estateCmService.UpdateOrderStatus(item.AgencyCom_EstateId, OrderStatus.COMPARED); estateFwService.UpdateFlowStatus(item.EstateId, FlowStatus.EXPORTED_ORDERSTATUS); break; } default: { break; } } }); } }