private Boolean MatchGroupType(ObjectSingleAttributeDTO gender, ObjectSingleAttributeDTO maritalStatus, int?groupTypeId) { return((groupTypeId == GroupTypeMixedAttributeId && maritalStatus.Value.AttributeId != ParticipantJourneyTogetherAttributeId) || (groupTypeId == GroupTypeMarriedCouplesAttributeId && maritalStatus.Value.AttributeId == ParticipantJourneyTogetherAttributeId) || (groupTypeId == GroupTypeMixedAttributeId && maritalStatus.Value.AttributeId == ParticipantJourneyTogetherAttributeId) || (groupTypeId == GroupTypeMenAttributeId && (gender.Value.AttributeId == ParticipantGenderManAttributeId) && (maritalStatus.Value.AttributeId != ParticipantJourneyTogetherAttributeId)) || (groupTypeId == GroupTypeWomenAttributeId && (gender.Value.AttributeId == ParticipantGenderWomanAttributeId) && (maritalStatus.Value.AttributeId != ParticipantJourneyTogetherAttributeId))); }
private Boolean SortGoal(ObjectSingleAttributeDTO participantGoal, int?groupGoalId) { if (!groupGoalId.HasValue) { return(false); } if (!_goalMatches.ContainsKey(groupGoalId.Value)) { return(false); } return(participantGoal.Value.AttributeId == _goalMatches[groupGoalId.Value]); }
private KeyValuePair <int, ObjectSingleAttributeDTO> ConvertToSingleAttribute(List <MpAttribute> mpAttributes, int attributeId) { var mpAttribute = mpAttributes.First(x => x.AttributeId == attributeId); var groupSingleAttribute = new ObjectSingleAttributeDTO() { Notes = string.Empty, Value = new AttributeDTO() { AttributeId = mpAttribute.AttributeId, Category = mpAttribute.Category, CategoryDescription = mpAttribute.CategoryDescription, CategoryId = mpAttribute.CategoryId, Description = mpAttribute.Description, Name = mpAttribute.Name, SortOrder = mpAttribute.SortOrder } }; return(new KeyValuePair <int, ObjectSingleAttributeDTO>(mpAttribute.AttributeTypeId, groupSingleAttribute)); }
private Boolean CheckCapacity(ObjectSingleAttributeDTO maritalStatus, int capacity) { return(capacity > (maritalStatus.Value.AttributeId == ParticipantJourneyTogetherAttributeId ? 1 : 0)); }