public System.Double GetDepreciation(System.DateTime argForPurchase, System.DateTime argDateOfLoss) { if (this.DepreciationSchedules.Count <= 0) { return(this.Depreciation); } else { foreach (DepreciationSchedule var in this.DepreciationSchedules.Values) { Period prd = new Period(argForPurchase, var.MonthAgeFrom, var.MonthAgeTill); if (prd.BelongsTo(argDateOfLoss)) { return(var.DepreciationRate); } } } return(this.mDepreciation); }