public bool ImportEstate(EstateCtType estateCtType) { string funMsg = "function: ImportEstate(EstateCtType estateCtType)" + FileUtility.NewLine + _ClassMsg; try { estateCtType.CreateBy = "System.Console"; int effected = _DbService.ImportEstate(estateCtType); return(effected > 0); } catch (Exception ex) { throw ex; } }
public int ImportEstate(EstateCtType estateCtType) { string funMsg = "function: ImportEstate(EstateCtType estateCtType)" + FileUtility.NewLine + _ClassMsg; try { string procedure = "spImportEstate"; return(DbUtility.ExecuteNonQueryByProc(procedure, this.ConnStr, new SqlParameter[] { new SqlParameter { ParameterName = "@scopeId", SqlDbType = SqlDbType.Char, Value = estateCtType.ScopeId }, new SqlParameter { ParameterName = "@estateName", SqlDbType = SqlDbType.NVarChar, Value = estateCtType.EstateName }, new SqlParameter { ParameterName = "@address", SqlDbType = SqlDbType.NVarChar, Value = estateCtType.Address }, new SqlParameter { ParameterName = "@operateStatus", SqlDbType = SqlDbType.Int, Value = estateCtType.Operate }, new SqlParameter { ParameterName = "@FlowStatus", SqlDbType = SqlDbType.Int, Value = estateCtType.Flow }, new SqlParameter { ParameterName = "@agencyCom_EstateId", SqlDbType = SqlDbType.Char, Value = estateCtType.AgencyCom_EstateId }, new SqlParameter { ParameterName = "@agencyCom_ScopeId", SqlDbType = SqlDbType.Char, Value = estateCtType.AgencyCom_ScopeId }, new SqlParameter { ParameterName = "@agencyCom_EstateName", SqlDbType = SqlDbType.NVarChar, Value = estateCtType.AgencyCom_EstateName }, new SqlParameter { ParameterName = "@agencyCom_Address", SqlDbType = SqlDbType.NVarChar, Value = estateCtType.AgencyCom_Address }, new SqlParameter { ParameterName = "@createBy", SqlDbType = SqlDbType.Char, Value = estateCtType.CreateBy } })); } catch (Exception ex) { throw ex; } }
public EstateCt GetEstateById(string estateId) { string funMsg = "Function: GetEstateById(string estateId)" + FileUtility.NewLine + _ClassMsg; try { EstateCtType estateType = GetEstateTypeById(estateId); if (estateType == null) { return(null); } return(new EstateCt(estateType)); } catch (Exception ex) { throw ex; } }
static void Estate_A2C_ing(string estateId) { // DateTime begin = DateTime.Now; EstateCmService estateCmService = new EstateCmService(); EstateCmType estateCmType = estateCmService.GetEstateTypeById(estateId); EstateCtType estateCtType = new EstateCtType(estateCmType); EstateCtService estateCtService = new EstateCtService(); estateCtService.ImportEstate(estateCtType); BuildCmService buildCmService = new BuildCmService(); List <BuildCmType> buildType = buildCmService.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_A2C(item); }); } DateTime end = DateTime.Now; }
public EstateCt(EstateCtType estateType) : base(estateType) { this.Scope = new Scope(this.ScopeId); }