protected void SetQualityBasedOnQualityLevel(int QualityLevel, int QualityDelta, SignSet signSet) { switch (signSet) { case SignSet.inf: { if (Product.Quality < QualityLevel) { this.SetQuality(QualityDelta); } break; } case SignSet.sup: { if (Product.Quality > QualityLevel) { this.SetQuality(QualityDelta); } break; } } }
protected void SetQualityBasedOnSellIn(int SelInResidual, int QualityLevel, int QualityDelta, SignSet signSet, bool withoutQualityChek = false) { if (this.Product.SellIn < SelInResidual && !withoutQualityChek) { this.SetQualityBasedOnQualityLevel(QualityLevel, QualityDelta, signSet); } if (withoutQualityChek) { if (Product.SellIn < SelInResidual) { this.SetQuality(QualityDelta); } } }