Exemplo n.º 1
0
        private void Fixupcustomer_type(customer_type previousValue)
        {
            if (previousValue != null && previousValue.customers.Contains(this))
            {
                previousValue.customers.Remove(this);
            }

            if (customer_type != null)
            {
                if (!customer_type.customers.Contains(this))
                {
                    customer_type.customers.Add(this);
                }
                if (type_id != customer_type.id)
                {
                    type_id = customer_type.id;
                }
            }
            else if (!_settingFK)
            {
                type_id = null;
            }
        }
Exemplo n.º 2
0
        private void Fixupcustomer_type(customer_type previousValue)
        {
            if (previousValue != null && previousValue.customers.Contains(this))
            {
                previousValue.customers.Remove(this);
            }

            if (customer_type != null)
            {
                if (!customer_type.customers.Contains(this))
                {
                    customer_type.customers.Add(this);
                }
                if (type_id != customer_type.id)
                {
                    type_id = customer_type.id;
                }
            }
            else if (!_settingFK)
            {
                type_id = null;
            }
        }