private void AddRequester(IFirstAndLastName[] people)
        {
            var pairsparam = new PairsGroupClause
            {
                Pairs = new List<ValuePair>(),
                ClauseOperator = ClauseOperator.AND,
                InterClauseOperator = ClauseOperator.OR
            };

            foreach (var person in people)
            {
                pairsparam.Pairs.Add(
                    new ValuePair(
                        new ValueClause
                        {
                            ClauseOperator = ClauseOperator.AND,
                            SearchField = SearchField.RequesterFirstName,
                            Operator = Operator.Equals,
                            Value = person.FirstName
                        },
                        ClauseOperator.AND,
                        new ValueClause
                        {
                            ClauseOperator = ClauseOperator.AND,
                            SearchField = SearchField.RequesterLastName,
                            Operator = Operator.Equals,
                            Value = person.LastName
                        }));
            }

            this.pairsgroupparams.Add(pairsparam);
        }
        private void AddPersonParam(IFirstAndLastName person)
        {
            if (SearchFieldIsPending)
            {
                var pendingsearchfield = PendingSearchField;

                if (pendingsearchfield == SearchField.RequesterFirstName || pendingsearchfield == SearchField.RequesterLastName)
                {
                    this.AddRequester(person);
                }
                else if (pendingsearchfield == SearchField.SubmittedBy)
                {
                    throw new NotSupportedException("Submitter can only be searched by userid.");
                }
                else if (pendingsearchfield == SearchField.LastModifiedBy)
                {
                    throw new NotSupportedException("Modifier can only be searched by userid.");
                }
                else if (pendingsearchfield == SearchField.AssigneePersonFullName || pendingsearchfield == SearchField.AssigneePersonUserID)
                {
                    this.AddAssignee(person);
                }
            }
        }
 private void AddRequester(IFirstAndLastName person)
 {
     this.AddRequester(new IFirstAndLastName[] { person });
 }
 private void AddAssignee(IFirstAndLastName person)
 {
     this.AddParam(SearchField.AssigneePersonFullName, Operator.Equals, string.Format("{0} {1}", person.FirstName, person.LastName));
 }