예제 #1
0
파일: address.cs 프로젝트: zaieda/RetailPOS
        private void Fixuplocality(locality previousValue)
        {
            if (previousValue != null && previousValue.addresses.Contains(this))
            {
                previousValue.addresses.Remove(this);
            }

            if (locality != null)
            {
                if (!locality.addresses.Contains(this))
                {
                    locality.addresses.Add(this);
                }
                if (locality_id != locality.id)
                {
                    locality_id = locality.id;
                }
            }
            else if (!_settingFK)
            {
                locality_id = null;
            }
        }
예제 #2
0
파일: address.cs 프로젝트: njmube/RetailPOS
        private void Fixuplocality(locality previousValue)
        {
            if (previousValue != null && previousValue.addresses.Contains(this))
            {
                previousValue.addresses.Remove(this);
            }

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