Ejemplo n.º 1
0
        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;
            }
            }
        }
Ejemplo n.º 2
0
        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);
                }
            }
        }