private void FixupExerciseCardMaster(ExerciseCardMaster previousValue)
        {
            if (previousValue != null && previousValue.ExrciseCardLevelSets.Contains(this))
            {
                previousValue.ExrciseCardLevelSets.Remove(this);
            }

            if (ExerciseCardMaster != null)
            {
                if (!ExerciseCardMaster.ExrciseCardLevelSets.Contains(this))
                {
                    ExerciseCardMaster.ExrciseCardLevelSets.Add(this);
                }
                if (exrciseCardId != ExerciseCardMaster.ID)
                {
                    exrciseCardId = ExerciseCardMaster.ID;
                }
            }
        }
Beispiel #2
0
        private void FixupExerciseCardMaster(ExerciseCardMaster previousValue)
        {
            if (previousValue != null && previousValue.AssignExercises.Contains(this))
            {
                previousValue.AssignExercises.Remove(this);
            }

            if (ExerciseCardMaster != null)
            {
                if (!ExerciseCardMaster.AssignExercises.Contains(this))
                {
                    ExerciseCardMaster.AssignExercises.Add(this);
                }
                if (exerciseCardMasterId != ExerciseCardMaster.ID)
                {
                    exerciseCardMasterId = ExerciseCardMaster.ID;
                }
            }
            else if (!_settingFK)
            {
                exerciseCardMasterId = null;
            }
        }