コード例 #1
0
        public static CompleteViewModel GetCompleteViewModel(Interview interview, Exam exam, Candidate candidate)
        {
            var viewModel = new CompleteViewModel();

            viewModel.InterviewId          = interview.Id;
            viewModel.Score                = interview.Score;
            viewModel.CandidateName        = candidate.FirstName + " " + candidate.LastName;
            viewModel.CandidateDescription = candidate.Description;
            viewModel.ExamLogo             = exam.Logo;
            viewModel.ExamTypeLogo         = MediaManager.GetIconForExamType(exam.Type);
            viewModel.Type = exam.Type;

            return(viewModel);
        }
コード例 #2
0
        public static ResultViewModel GetResultViewModels(Interview interview, Candidate candidate, Exam exam)
        {
            var viewModel = new ResultViewModel();

            viewModel.InterviewId          = interview.Id;
            viewModel.Score                = Convert.ToInt32(interview.Score);
            viewModel.CandidateFullName    = candidate.FirstName + " " + candidate.LastName;
            viewModel.CandidateDescription = candidate.Description;
            viewModel.ExamLogo             = exam.Logo;
            viewModel.ExamTypeLogo         = MediaManager.GetIconForExamType(exam.Type);
            viewModel.Type     = exam.Type;
            viewModel.Date     = interview.Date;
            viewModel.ExamName = exam.Name;
            viewModel.Email    = candidate.Email;

            return(viewModel);
        }
コード例 #3
0
        public static ExamViewModel GetExamViewModel(Interview interview, Exam exam, Candidate candidate, List <Question> questions, List <Answer> answers)
        {
            var viewModel = new ExamViewModel();

            viewModel.Id                   = exam.Id;
            viewModel.CategoryId           = exam.CategoryId;
            viewModel.CandidateId          = candidate.Id;
            viewModel.InterviewId          = interview.Id;
            viewModel.CandidateFullName    = candidate.FirstName + " " + candidate.LastName;
            viewModel.CandidateDescription = candidate.Description;
            viewModel.CandidateEmail       = candidate.Email;
            viewModel.CandidatePhone       = candidate.Phone;
            viewModel.Type                 = exam.Type;
            viewModel.Logo                 = exam.Logo;
            viewModel.Name                 = exam.Name;
            viewModel.Score                = interview.Score;
            viewModel.Description          = exam.Description;
            viewModel.TypeLogo             = MediaManager.GetIconForExamType(exam.Type);
            viewModel.Questions            = GetQuestionsForExamViewModel(questions, answers);

            return(viewModel);
        }