private void FixupPartnerCommission(PartnerCommission previousValue)
        {
            if (previousValue != null && previousValue.Client_Account.Contains(this))
            {
                previousValue.Client_Account.Remove(this);
            }


            if (PartnerCommission != null)
            {
                if (!PartnerCommission.Client_Account.Contains(this))
                {
                    PartnerCommission.Client_Account.Add(this);
                }

                if (FK_FeeStructureID != PartnerCommission.PK_PartnerCommID)

                {
                    FK_FeeStructureID = PartnerCommission.PK_PartnerCommID;
                }
            }

            else if (!_settingFK)

            {
                FK_FeeStructureID = null;
            }
        }
        private void FixupPartnerCommission(PartnerCommission previousValue)
        {
            if (previousValue != null && previousValue.ManagedAccountPrograms.Contains(this))
            {
                previousValue.ManagedAccountPrograms.Remove(this);
            }


            if (PartnerCommission != null)
            {
                if (!PartnerCommission.ManagedAccountPrograms.Contains(this))
                {
                    PartnerCommission.ManagedAccountPrograms.Add(this);
                }

                if (FK_FeeGroupID != PartnerCommission.PK_PartnerCommID)

                {
                    FK_FeeGroupID = PartnerCommission.PK_PartnerCommID;
                }
            }

            else if (!_settingFK)

            {
                FK_FeeGroupID = null;
            }
        }