// Different region for each class override /// <summary> /// Overrides equals /// name, region, specie /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { bool lReturn = false; if (obj == null || obj.GetType() != this.GetType()) { return(false); } CropCoefficient lCropCoefficient = obj as CropCoefficient; lReturn = this.CropCoefficientId.Equals(lCropCoefficient.CropCoefficientId); return(lReturn); }
/// <summary> /// Constructor with parameters /// </summary> /// <param name="pSpecie"></param> /// <param name="pSowingDate"></param> /// <param name="pCropCoefficient"></param> /// <param name="pRegion"></param> /// <param name="pPhenologicalStageList"></param> public CropInformationByDate(Specie pSpecie, DateTime pSowingDate, CropCoefficient pCropCoefficient, Region pRegion, List <PhenologicalStage> pPhenologicalStageList) { this.Name = pSpecie.Name; this.SowingDate = pSowingDate; this.DaysAfterSowing = 0; this.SpecieId = pSpecie.SpecieId; this.CropCoefficientId = pCropCoefficient.CropCoefficientId; this.RegionId = pRegion.RegionId; this.PhenologicalStageList = pPhenologicalStageList; this.AccumulatedGrowingDegreeDays = 0; this.StageId = 0; this.CropCoefficientValue = 0; this.RootDepth = 0; }