Example #1
0
        public InterviewerArr ToInterviewerArr()
        {
            InterviewerArr interviewerArr = new InterviewerArr();

            NomineeScoreType nomineeScoreType;
            Interviewer      interviewer;

            for (int i = 0; i < this.Count; i++)
            {
                nomineeScoreType = this[i] as NomineeScoreType;
                interviewer      = nomineeScoreType.Interviewer;
                if (!interviewerArr.IsContains(interviewer.DBId))
                {
                    interviewerArr.Add(interviewer);
                }
            }

            return(interviewerArr);
        }
        public InterviewerArr Filter(string firstName, string lastName, string id, Credentials credentials, int dBId = 0)
        {
            InterviewerArr interviewerArr = new InterviewerArr();

            Interviewer interviewer;

            for (int i = 0; i < this.Count; i++)
            {
                interviewer = (this[i] as Interviewer);
                if ((firstName == "" || interviewer.FirstName.StartsWith(firstName)) &&
                    (lastName == "" || interviewer.LastName.StartsWith(lastName)) &&
                    (id == "" || interviewer.Id.StartsWith(id)) &&
                    (dBId == 0 || interviewer.DBId == dBId) &&
                    (credentials == Credentials.Empty || interviewer.Credentials == credentials))
                {
                    interviewerArr.Add(interviewer);
                }
            }

            return(interviewerArr);
        }
Example #3
0
        public SortedDictionary <string, string> GetSortedDictionary()
        {
            SortedDictionary <string, string> dictionary = new SortedDictionary <string, string>();
            string         y = "";
            InterviewerArr interviewerArr = this.ToInterviewerArr();
            NomineeArr     nomineeArr;

            foreach (Interviewer curInterviewer in interviewerArr)
            {
                nomineeArr = this.Filter(curInterviewer, Nominee.Empty).ToNomineeArr();

                y += (nomineeArr[0] as Nominee).ToString();

                for (int i = 1; i < nomineeArr.Count; i++)
                {
                    y += "\n" + (nomineeArr[i] as Nominee).ToString();
                }

                dictionary.Add(curInterviewer.ToString(), y);
                y = "";
            }
            return(dictionary);
        }