public BuildFw(BuildFwType buildType) : base(buildType) { EstateFwService service = new EstateFwService(); this.Estate = service.GetEstateById(this.EstateId); }
public int ImportBuild(BuildFwType buildFwType) { string funMsg = "function: ImportBuild(BuildFwType buildFwType)" + FileUtility.NewLine + _ClassMsg; try { string procedure = "spImportBuild"; return(DbUtility.ExecuteNonQueryByProc(procedure, this.ConnStr, new SqlParameter[] { new SqlParameter { ParameterName = "@buildName", SqlDbType = SqlDbType.Char, Value = buildFwType.BuildName }, new SqlParameter { ParameterName = "@address", SqlDbType = SqlDbType.Char, Value = buildFwType.Address }, new SqlParameter { ParameterName = "@flowStatus", SqlDbType = SqlDbType.Int, Value = buildFwType.Flow }, new SqlParameter { ParameterName = "@operateStatus", SqlDbType = SqlDbType.Int, Value = buildFwType.Operate }, new SqlParameter { ParameterName = "@collect_BuildId", SqlDbType = SqlDbType.Char, Value = buildFwType.Collect_BuildId }, new SqlParameter { ParameterName = "@collect_EstateId", SqlDbType = SqlDbType.Char, Value = buildFwType.Collect_EstateId }, new SqlParameter { ParameterName = "@collect_BuildName", SqlDbType = SqlDbType.NVarChar, Value = buildFwType.Collect_BuildName }, new SqlParameter { ParameterName = "@collect_Address", SqlDbType = SqlDbType.NVarChar, Value = buildFwType.Collect_Address }, new SqlParameter { ParameterName = "@agencyCom_BuildId", SqlDbType = SqlDbType.Char, Value = buildFwType.AgencyCom_BuildId }, new SqlParameter { ParameterName = "@agencyCom_EstateId", SqlDbType = SqlDbType.Char, Value = buildFwType.AgencyCom_EstateId }, new SqlParameter { ParameterName = "@agencyCom_BuildName", SqlDbType = SqlDbType.NVarChar, Value = buildFwType.AgencyCom_BuildName }, new SqlParameter { ParameterName = "@agencyCom_Address", SqlDbType = SqlDbType.NVarChar, Value = buildFwType.AgencyCom_Address }, new SqlParameter { ParameterName = "@createBy", SqlDbType = SqlDbType.Char, Value = buildFwType.CreateBy }, })); } catch (Exception ex) { throw ex; } }
public bool ImortBuild(BuildFwType buildFwType) { string funMsg = "function: ImportBuild(BuildFwType buildFwType)" + FileUtility.NewLine + _ClassMsg; try { buildFwType.CreateBy = "System.Console"; int effected = _DbService.ImportBuild(buildFwType); return(effected > 0); } catch (Exception ex) { throw ex; } }
public BuildFw GetBuild(string buildId) { string funMsg = "Function: GetBuild(string buildId)" + FileUtility.NewLine + _ClassMsg; try { BuildFwType buildType = GetBuildType(buildId); if (buildType == null) { return(null); } return(new BuildFw(buildType)); } 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; }