Esempio n. 1
0
        public IActionResult GetById(string id)
        {
            var interview       = _iInterviewService.GetById(id);
            var interviewModels = _iMapper.Map <InterviewModels>(interview);

            var post         = _iPostService.GetById(interview.PostId);
            var postModel    = _iMapper.Map <PostModel>(post);
            var resume       = _iResumeService.GetById(interview.ResumeId);
            var resumeModel  = _iMapper.Map <ResumeModel>(resume);
            var company      = _iCompanyService.GetById(post.CompanyId);
            var companyModel = _iMapper.Map <ResponseCompanyUserModel>(company);
            var user         = _iUserService.GetById(resume.UserId);
            var userModel    = _iMapper.Map <ResponseUserModel>(user);

            interviewModels.postModel        = postModel;
            interviewModels.resumeModel      = resumeModel;
            interviewModels.companyUserModel = companyModel;
            interviewModels.userModel        = userModel;

            var count = 1;

            if (resumeModel != null)
            {
                return(Output(
                           interviewModels,
                           count));
            }
            throw new Exception("该面试邀请不存在");
        }
Esempio n. 2
0
        // GET: Interview/Details/5
        public ActionResult Details(int id)
        {
            Interview cl = Service.GetById(id);

            if (cl == null)
            {
                return(HttpNotFound());
            }

            return(View(cl));
        }