private void AddFollowUp() { if (FollowUpList.Any(x => x.IsRejected)) { return; } if (FollowUpItem != null) { if ((FollowUpList.IndexOf(FollowUpItem)) != (FollowUpList.Count - 1)) { return; } if (FollowUpList[FollowUpList.Count - 1].ObjStatus.IsEmpty) { return; } FollowUpList.Add(new RFQFollowUpViewModel { Style = Style, ParentID = SubHeaderSerial }); FollowUpItem = FollowUpList[FollowUpList.Count - 1]; FollowUpItem.ObjStatus.IsEmpty = true; FollowUpItem.ObjStatus.IsNew = true; FollowUpItem.SizesCollection.Clear(); foreach (var size in RFQGlobalLkps.StatisSizesCollection.Where(x => x.StyleCode == Style)) { FollowUpItem.SizesCollection.Add(size); } } else { FollowUpList.Add(new RFQFollowUpViewModel { Style = Style, ParentID = SubHeaderSerial }); FollowUpItem = FollowUpList[FollowUpList.Count - 1]; FollowUpItem.ObjStatus.IsEmpty = true; FollowUpItem.ObjStatus.IsNew = true; FollowUpItem.SizesCollection.Clear(); foreach (var size in RFQGlobalLkps.StatisSizesCollection.Where(x => x.StyleCode == Style)) { FollowUpItem.SizesCollection.Add(size); } } }