示例#1
0
        private void Fixuptbl_SimSoDep_NhaMang(tbl_SimSoDep_NhaMang previousValue)
        {
            if (previousValue != null && previousValue.tbl_SimSoDep_SimSo.Contains(this))
            {
                previousValue.tbl_SimSoDep_SimSo.Remove(this);
            }

            if (tbl_SimSoDep_NhaMang != null)
            {
                if (!tbl_SimSoDep_NhaMang.tbl_SimSoDep_SimSo.Contains(this))
                {
                    tbl_SimSoDep_NhaMang.tbl_SimSoDep_SimSo.Add(this);
                }
                if (MaNhaMang != tbl_SimSoDep_NhaMang.MaNhaMang)
                {
                    MaNhaMang = tbl_SimSoDep_NhaMang.MaNhaMang;
                }
            }
        }
示例#2
0
        private void Fixuptbl_SimSoDep_NhaMang(tbl_SimSoDep_NhaMang previousValue)
        {
            if (previousValue != null && previousValue.tbl_SimSoDep_DauSoChiTiet.Contains(this))
            {
                previousValue.tbl_SimSoDep_DauSoChiTiet.Remove(this);
            }

            if (tbl_SimSoDep_NhaMang != null)
            {
                if (!tbl_SimSoDep_NhaMang.tbl_SimSoDep_DauSoChiTiet.Contains(this))
                {
                    tbl_SimSoDep_NhaMang.tbl_SimSoDep_DauSoChiTiet.Add(this);
                }
                if (MaNhaMang != tbl_SimSoDep_NhaMang.MaNhaMang)
                {
                    MaNhaMang = tbl_SimSoDep_NhaMang.MaNhaMang;
                }
            }
            else if (!_settingFK)
            {
                MaNhaMang = null;
            }
        }