Ejemplo n.º 1
0
        public void Remove(int dBId)
        {
            Interviewer inter = GetInterviewerByDBId(dBId);

            if (inter != Interviewer.Empty && inter != null)
            {
                base.Remove(inter);
            }
        }
Ejemplo n.º 2
0
        public void Remove(string fullName)
        {
            Interviewer inter = GetInterviewerByName(fullName);

            if (inter != Interviewer.Empty && inter != null)
            {
                base.Remove(inter);
            }
        }
Ejemplo n.º 3
0
 public bool DoesExist(Interviewer interviewer)
 {
     //return whether curPosition exists in a nominee on this NomineeArr.
     for (int i = 0; i < this.Count; i++)
     {
         if ((this[i] as NomineeScoreType).Interviewer == interviewer)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 4
0
        public Interviewer GetInterviewerWithMaxDBId()
        {
            Interviewer maxInterviewer = new Interviewer();

            for (int i = 0; i < this.Count; i++)
            {
                if ((this[i] as Interviewer).DBId > maxInterviewer.DBId)
                {
                    maxInterviewer = (this[i] as Interviewer);
                }
            }
            return(maxInterviewer);
        }
        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"];
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
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);
        }
Ejemplo n.º 9
0
        public void Fill()
        {
            this.Clear();
            DataTable dataTable = Interviewer_Dal.GetDataTable();


            DataRow     dataRow;
            Interviewer interviewer;

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

                interviewer = new Interviewer(dataRow);
                if (interviewer.DBId != 0)
                {
                    Add(interviewer);
                }
            }
        }
Ejemplo n.º 10
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);
        }