Exemplo n.º 1
0
        private void Fixuptown_city(town_city previousValue)
        {
            if (previousValue != null && previousValue.addresses.Contains(this))
            {
                previousValue.addresses.Remove(this);
            }

            if (town_city != null)
            {
                if (!town_city.addresses.Contains(this))
                {
                    town_city.addresses.Add(this);
                }
                if (town_city_id != town_city.id)
                {
                    town_city_id = town_city.id;
                }
            }
            else if (!_settingFK)
            {
                town_city_id = null;
            }
        }
Exemplo n.º 2
0
        private void Fixuptown_city(town_city previousValue)
        {
            if (previousValue != null && previousValue.addresses.Contains(this))
            {
                previousValue.addresses.Remove(this);
            }

            if (town_city != null)
            {
                if (!town_city.addresses.Contains(this))
                {
                    town_city.addresses.Add(this);
                }
                if (town_city_id != town_city.id)
                {
                    town_city_id = town_city.id;
                }
            }
            else if (!_settingFK)
            {
                town_city_id = null;
            }
        }