public BuildCt(BuildCtType buildType)
            : base(buildType)
        {
            EstateCtService service = new EstateCtService();

            this.Estate = service.GetEstateById(this.EstateId);
        }
Beispiel #2
0
        public bool ImortBuild(BuildCtType buildCtType)
        {
            string funMsg = "function: ImortBuild(BuildCtType buildCtType)" + FileUtility.NewLine + _ClassMsg;

            try
            {
                buildCtType.CreateBy = "System.Console";
                int effected = _DbService.ImportBuild(buildCtType);
                return(effected > 0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
        public int ImportBuild(BuildCtType buildCtType)
        {
            string funMsg = "function: ImportBuild(BuildCtType buildCtType)" + FileUtility.NewLine + _ClassMsg;

            try
            {
                string procedure = "spImportBuild";
                return(DbUtility.ExecuteNonQueryByProc(procedure, this.ConnStr, new SqlParameter[] {
                    new SqlParameter {
                        ParameterName = "@buildName", SqlDbType = SqlDbType.NVarChar, Value = buildCtType.BuildName
                    },
                    new SqlParameter {
                        ParameterName = "@address", SqlDbType = SqlDbType.NVarChar, Value = buildCtType.Address
                    },
                    new SqlParameter {
                        ParameterName = "@operateStatus", SqlDbType = SqlDbType.Int, Value = buildCtType.Operate
                    },
                    new SqlParameter {
                        ParameterName = "@flowStatus", SqlDbType = SqlDbType.Int, Value = buildCtType.Flow
                    },
                    new SqlParameter {
                        ParameterName = "@agencyCom_BuildId", SqlDbType = SqlDbType.Char, Value = buildCtType.AgencyCom_BuildId
                    },
                    new SqlParameter {
                        ParameterName = "@agencyCom_EstateId", SqlDbType = SqlDbType.Char, Value = buildCtType.AgencyCom_EstateId
                    },
                    new SqlParameter {
                        ParameterName = "@agencyCom_BuildName", SqlDbType = SqlDbType.NVarChar, Value = buildCtType.AgencyCom_BuildName
                    },
                    new SqlParameter {
                        ParameterName = "@agencyCom_Address", SqlDbType = SqlDbType.NVarChar, Value = buildCtType.AgencyCom_Address
                    },
                    new SqlParameter {
                        ParameterName = "@createBy", SqlDbType = SqlDbType.Char, Value = buildCtType.CreateBy
                    }
                }));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        static void Build_C2F(BuildCtType buildCtType)
        {
            //
            DateTime       begin          = DateTime.Now;
            BuildFwType    buildFwType    = new BuildFwType(buildCtType);
            BuildFwService buildFwService = new BuildFwService();

            buildFwService.ImortBuild(buildFwType);
            UnitCtService     unitCtService = new UnitCtService();
            List <UnitCtType> unitType      = unitCtService.ListUnit(buildFwType.BuildId).ToList();

            if (unitType != null && unitType.Count > 0)
            {
                unitType.ForEach(item =>
                {
                    Console.WriteLine("时间: {0}, 导入单元[{1}]..", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), item.CY_Axis + item.CX_Axis);
                    Unit_C2F(item);
                });
            }
            DateTime end = DateTime.Now;
        }