public LogEntry(DateTime dateTime, string entry, Nominee nominee, int id = 0)
 {
     m_Id       = id;
     m_Nominee  = nominee;
     m_DateTime = dateTime;
     m_Entry    = entry;
 }
 public LogEntry(DataRow logEntry_prop)
 {
     m_Id       = (int)logEntry_prop["Id"];
     m_Nominee  = new Nominee(logEntry_prop.GetParentRow("LogEntryNominee"));
     m_DateTime = (DateTime)logEntry_prop["DateTime"];
     m_Entry    = logEntry_prop["Entry"].ToString().Replace("$", "'");
 }
        public NomineeArr Filter(Nominee filter, PositionArr filterPositionArr)
        {
            NomineeArr nomineeArr = new NomineeArr();

            //check if each nominee in the database stands in the filters args. if it doe's
            //then it is added to the new NomineeArr.
            Nominee nominee;

            PositionNomineeArr positionNomineeArr;
            PositionArr        positionArr;

            for (int i = 0; i < this.Count; i++)
            {
                positionNomineeArr = new PositionNomineeArr();
                nominee            = (this[i] as Nominee);
                positionNomineeArr = positionNomineeArr.Filter(nominee, Position.Empty);
                positionArr        = positionNomineeArr.ToPositionArr();

                if (
                    (filter.FirstName == "" || nominee.FirstName.StartsWith(filter.FirstName)) &&
                    (filter.LastName == "" || nominee.LastName.StartsWith(filter.LastName)) &&
                    (filter.Id == "" || nominee.Id.StartsWith(filter.Id)) &&
                    (filter.Email == "" || nominee.Email.Contains(filter.Email)) &&
                    (filter.BirthYear == 0 || nominee.BirthYear == filter.BirthYear) &&
                    (filter.CellPhone == "" || (nominee.CellAreaCode + nominee.CellPhone).Contains(filter.CellPhone)) &&
                    (filter.City.ToString() == "" || nominee.City.Name.StartsWith(filter.City.ToString())) &&
                    (positionArr.Count == 0 || positionArr.IsContains(filterPositionArr))
                    )
                {
                    nomineeArr.Add(nominee);
                }
            }

            return(nomineeArr);
        }
        public Nominee MaxNomineeDBId()
        {
            Nominee max = Nominee.Empty;

            for (int i = 0; i < this.Count; i++)
            {
                max = (this[i] as Nominee).DBId > max.DBId ? this[i] as Nominee : max;
            }
            return(max);
        }
Beispiel #5
0
 public bool DoesExist(Nominee nominee)
 {
     //return whether curCity exists in a nominee on this NomineeArr.
     for (int i = 0; i < this.Count; i++)
     {
         if ((this[i] as NomineeScoreType).Nominee == nominee)
         {
             return(true);
         }
     }
     return(false);
 }
        public NomineeScoreType(DataRow NomineeScoreType_prop)
        {
            m_Id = (int)NomineeScoreType_prop["ID"];

            m_Interviewer = new Interviewer(NomineeScoreType_prop.GetParentRow("NomineeScoreType_Interviewer"));

            m_Nominee = new Nominee(NomineeScoreType_prop.GetParentRow("NomineeScoretype_Nominee"));

            m_ScoreType = new ScoreType(NomineeScoreType_prop.GetParentRow("NomineeScoretype_ScoreType"));

            m_Score = (byte)NomineeScoreType_prop["Score"];

            m_DateTime = (DateTime)NomineeScoreType_prop["DateTime"];
        }
Beispiel #7
0
        public bool DoesContainData(Interviewer interviewer, Nominee nominee, ScoreType scoreType)
        {
            NomineeScoreType nomineeScoreType;

            for (int i = 0; i < this.Count; i++)
            {
                nomineeScoreType = this[i] as NomineeScoreType;
                if (nomineeScoreType.Interviewer.Id == interviewer.Id && nomineeScoreType.Nominee.DBId == nominee.DBId && nomineeScoreType.ScoreType.Id == scoreType.Id)
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #8
0
        public PositionNomineeArr Filter(Nominee nominee, Position position)
        {
            PositionNomineeArr positionnomineeArr = new PositionNomineeArr();

            PositionNominee positionNominee;

            for (int i = 0; i < this.Count; i++)
            {
                positionNominee = this[i] as PositionNominee;
                if ((nominee == Nominee.Empty || nominee == positionNominee.Nominee) && (position == Position.Empty || positionNominee.Position == position))
                {
                    positionnomineeArr.Add(positionNominee);
                }
            }

            return(positionnomineeArr);
        }
Beispiel #9
0
        public NomineeScoreTypeArr Filter(Interviewer interviewer, Nominee nominee)
        {
            NomineeScoreTypeArr positionnomineeArr = new NomineeScoreTypeArr();

            NomineeScoreType nomineeScoreType;

            for (int i = 0; i < this.Count; i++)
            {
                nomineeScoreType = this[i] as NomineeScoreType;
                if ((interviewer == Interviewer.Empty || interviewer.DBId == nomineeScoreType.Interviewer.DBId) &&
                    (nominee == Nominee.Empty || nominee.DBId == nomineeScoreType.Nominee.DBId))
                {
                    positionnomineeArr.Add(nomineeScoreType);
                }
            }

            return(positionnomineeArr);
        }
Beispiel #10
0
        public NomineeScoreTypeArr Filter(Interviewer interviewer, Nominee nominee, Position position, DateTime dateTimeFrom, DateTime dateTimeTo)
        {
            NomineeScoreTypeArr positionnomineeArr = new NomineeScoreTypeArr();

            NomineeScoreType nomineeScoreType;

            for (int i = 0; i < this.Count; i++)
            {
                nomineeScoreType = this[i] as NomineeScoreType;
                if ((interviewer == Interviewer.Empty || interviewer.DBId == nomineeScoreType.Interviewer.DBId) &&
                    (nominee == Nominee.Empty || nominee.DBId == nomineeScoreType.Nominee.DBId) &&
                    (position == Position.Empty || position.Id == nomineeScoreType.ScoreType.Position.Id) &&
                    (dateTimeFrom <= nomineeScoreType.DateTime && nomineeScoreType.DateTime <= dateTimeTo))
                {
                    positionnomineeArr.Add(nomineeScoreType);
                }
            }

            return(positionnomineeArr);
        }
        public void Fill()
        {
            this.Clear();
            DataTable dataTable = Nominee_Dal.GetDataTable();


            DataRow dataRow;
            Nominee nominee;

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                dataRow = dataTable.Rows[i];

                nominee = new Nominee(dataRow);
                if (nominee.DBId != 0)
                {
                    Add(nominee);
                }
            }
        }
Beispiel #12
0
        public NomineeScoreTypeArr Filter(Interviewer interviewer, Nominee nominee, ScoreType scoreType, int score, DateTime dateTimeFrom, DateTime dateTimeTo)
        {
            NomineeScoreTypeArr positionnomineeArr = new NomineeScoreTypeArr();

            NomineeScoreType nomineeScoreType;

            for (int i = 0; i < this.Count; i++)
            {
                nomineeScoreType = this[i] as NomineeScoreType;
                if ((interviewer == Interviewer.Empty || interviewer == nomineeScoreType.Interviewer) &&
                    (nominee == Nominee.Empty || nominee == nomineeScoreType.Nominee) &&
                    (scoreType == ScoreType.Empty || scoreType == nomineeScoreType.ScoreType) &&
                    (score == 0 || score == nomineeScoreType.Score) &&
                    (dateTimeFrom <= nomineeScoreType.DateTime && nomineeScoreType.DateTime <= dateTimeTo))
                {
                    positionnomineeArr.Add(nomineeScoreType);
                }
            }

            return(positionnomineeArr);
        }
Beispiel #13
0
 public PositionNominee(DataRow PositionNominee_prop)
 {
     m_DBId   = (int)PositionNominee_prop["ID"];
     Position = new Position(PositionNominee_prop.GetParentRow("PositionNominee_Position"));
     Nominee  = new Nominee(PositionNominee_prop.GetParentRow("PositionNominee_Nominee"));
 }