コード例 #1
0
        private void FixupDisclaimerQuestionsMaster(DisclaimerQuestionsMaster previousValue)
        {
            if (previousValue != null && previousValue.DisclaimerQuestionOptions.Contains(this))
            {
                previousValue.DisclaimerQuestionOptions.Remove(this);
            }

            if (DisclaimerQuestionsMaster != null)
            {
                if (!DisclaimerQuestionsMaster.DisclaimerQuestionOptions.Contains(this))
                {
                    DisclaimerQuestionsMaster.DisclaimerQuestionOptions.Add(this);
                }
                if (questionId != DisclaimerQuestionsMaster.ID)
                {
                    questionId = DisclaimerQuestionsMaster.ID;
                }
            }
        }
コード例 #2
0
        private void FixupDisclaimerQuestionsMaster2(DisclaimerQuestionsMaster previousValue)
        {
            if (previousValue != null && previousValue.DisclaimerQuestionsMaster1.Contains(this))
            {
                previousValue.DisclaimerQuestionsMaster1.Remove(this);
            }

            if (DisclaimerQuestionsMaster2 != null)
            {
                if (!DisclaimerQuestionsMaster2.DisclaimerQuestionsMaster1.Contains(this))
                {
                    DisclaimerQuestionsMaster2.DisclaimerQuestionsMaster1.Add(this);
                }
                if (QuestionId != DisclaimerQuestionsMaster2.ID)
                {
                    QuestionId = DisclaimerQuestionsMaster2.ID;
                }
            }
            else if (!_settingFK)
            {
                QuestionId = null;
            }
        }