示例#1
0
        private void Fixupstaff(staff previousValue)
        {
            if (previousValue != null && previousValue.email_history.Contains(this))
            {
                previousValue.email_history.Remove(this);
            }

            if (staff != null)
            {
                if (!staff.email_history.Contains(this))
                {
                    staff.email_history.Add(this);
                }
                if (staff_id != staff.id)
                {
                    staff_id = staff.id;
                }
            }
            else if (!_settingFK)
            {
                staff_id = null;
            }
        }
示例#2
0
        private void Fixupstaff(staff previousValue)
        {
            if (previousValue != null && previousValue.email_history.Contains(this))
            {
                previousValue.email_history.Remove(this);
            }

            if (staff != null)
            {
                if (!staff.email_history.Contains(this))
                {
                    staff.email_history.Add(this);
                }
                if (staff_id != staff.id)
                {
                    staff_id = staff.id;
                }
            }
            else if (!_settingFK)
            {
                staff_id = null;
            }
        }