Esempio n. 1
0
        private void FixupUnitMeasure(UnitMeasure previousValue)
        {
            if (previousValue != null && previousValue.Products.Contains(this))
            {
                previousValue.Products.Remove(this);
            }

            if (UnitMeasure != null)
            {
                if (!UnitMeasure.Products.Contains(this))
                {
                    UnitMeasure.Products.Add(this);
                }
                if (SizeUnitMeasureCode != UnitMeasure.UnitMeasureCode)
                {
                    SizeUnitMeasureCode = UnitMeasure.UnitMeasureCode;
                }
            }
            else if (!_settingFK)
            {
                SizeUnitMeasureCode = null;
            }
        }
Esempio n. 2
0
        private void FixupUnitMeasure1(UnitMeasure previousValue)
        {
            if (previousValue != null && previousValue.Products1.Contains(this))
            {
                previousValue.Products1.Remove(this);
            }

            if (UnitMeasure1 != null)
            {
                if (!UnitMeasure1.Products1.Contains(this))
                {
                    UnitMeasure1.Products1.Add(this);
                }
                if (WeightUnitMeasureCode != UnitMeasure1.UnitMeasureCode)
                {
                    WeightUnitMeasureCode = UnitMeasure1.UnitMeasureCode;
                }
            }
            else if (!_settingFK)
            {
                WeightUnitMeasureCode = null;
            }
        }
        private void FixupUnitMeasure(UnitMeasure previousValue)
        {
            if (previousValue != null && previousValue.BillOfMaterials.Contains(this))
            {
                previousValue.BillOfMaterials.Remove(this);
            }

            if (UnitMeasure != null)
            {
                if (!UnitMeasure.BillOfMaterials.Contains(this))
                {
                    UnitMeasure.BillOfMaterials.Add(this);
                }
                if (UnitMeasureCode != UnitMeasure.UnitMeasureCode)
                {
                    UnitMeasureCode = UnitMeasure.UnitMeasureCode;
                }
            }
        }