/// <summary> /// Check if GeneralLoadGroup is in LoadGroupTable. /// </summary> private bool LoadGroupInLoadGroupTable(ModelGeneralLoadGroup generalLoadGroup) { foreach (ModelGeneralLoadGroup elem in this.GeneralLoadGroups) { if (elem.Guid == generalLoadGroup.Guid) { return(true); } } return(false); }
/// <summary> /// Add GeneralLoadGroup to LoadGroupTable. /// </summary> private void AddGeneralLoadGroup(ModelGeneralLoadGroup generalLoadGroup) { if (this.LoadGroupInLoadGroupTable(generalLoadGroup)) { // pass } else { this.GeneralLoadGroups.Add(generalLoadGroup); } }