public ECOClassification(CEQContext.ECOEvalution ecoevalution) : base(ecoevalution) { GEAContext db = new GEAContext(); this.id = 0; this.date = DateTime.Now; { SoilPollutionCategories spc = this.soilpollutioncategories = null; SoilPollutionCategories.GetByVolume_Cadastre(db, this.excessgroundconcentration, this.groundblur.spreadpoint.cadastretype.type_code, out spc); this.soilpollutioncategories = spc; } { WaterPollutionCategories wpc = this.waterpollutioncategories = null; WaterPollutionCategories.GetByExcess_Cadastre(db, this.exesswaterconcentration, this.groundblur.spreadpoint.cadastretype.type_code, out wpc); this.waterpollutioncategories = wpc; } foreach (WaterPollution wp in this.waterpolutionlist) { WaterPollutionCategories x = null; WaterPollutionCategories.GetByExcess_Cadastre(db, wp.excessconcentration, wp.cadastretype.type_code, out x); wp.waterpollutioncategories = x; } }
public WaterPollution(EcoObject ecojbject, float distance, float angle, PetrochemicalType petrochemicatype, float speedhorizontal, float maxconcentration = 0.0f, float timemaxconcentration = 0.0f, WaterPollutionCategories waterpollutioncategories = null) : base(ecojbject) { this.pointtype = POINTTYPE.ECO; this.comment = string.Format(comment_format, EcoObject.PREFIX, ecojbject.id); this.petrochemicatype = petrochemicatype; this.cadastretype = ecojbject.cadastretype; this.distance = distance; this.angle = angle; this.name = ecojbject.name; this.speedhorizontal = speedhorizontal; this.maxconcentration = maxconcentration; this.timemaxconcentration = timemaxconcentration; this.datemaxconcentration = Const.DATE_INFINITY; this.iswaterobject = ecojbject.iswaterobject; this.waterpollutioncategories = waterpollutioncategories; }