Example #1
0
        public EvaluationInfo Clone()
        {
            EvaluationInfo other = new EvaluationInfo();

            other.Candidate = this.Candidate;
            other.KPIID     = this.KPIID;
            other.Evaluator = this.Evaluator;

            return(other);
        }
Example #2
0
        static List <EvaluationInfo> Build4OneEvaluatorRole(string candidateName, string candidateRole,
                                                            string evaluatorRole, string[] evaluators)
        {
            if (evaluators == null)
            {
                return(null);
            }

            // locate candidate role
            if (!CANDIDATE_ROLE_KPI_MAP.ContainsKey(candidateRole))
            {
                MessageBox.Show("cannot find candidat role " + candidateRole + " for " + candidateName);
                return(null);
            }

            // locate kpi info
            List <KPIInfo> kpiInfoList = new List <KPIInfo>(); // it is possible for one same role evaluate multiple KPIs

            foreach (var nextInfo in CANDIDATE_ROLE_KPI_MAP[candidateRole])
            {
                if (nextInfo.EvaluatorRole.Contains(evaluatorRole))
                {
                    kpiInfoList.Add(nextInfo);
                }
            }
            if (kpiInfoList.Count == 0)
            {
                MessageBox.Show("cannot find KPI info for evaluator " + evaluatorRole + " for " + candidateName);
                return(null);
            }

            // build the evaluator list
            List <EvaluationInfo> infoList = new List <EvaluationInfo>();

            for (int i = 0; i < evaluators.Length; i++)
            {
                foreach (var nextInfo in kpiInfoList)
                {
                    EvaluationInfo info = new EvaluationInfo()
                    {
                        Candidate = candidateName,
                        KPIID     = nextInfo.ID
                    };

                    info.Evaluator = evaluators[i];

                    infoList.Add(info);
                }
            }

            return(infoList);
        }