Ejemplo n.º 1
0
        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);
                BuildCtService buildService = new BuildCtService();
                this.BuildCollection = buildService.ListBuild(this.EstateId, 1, this.PageSize, out recordCount);
                this.RecordCount     = recordCount;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        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;
        }