示例#1
0
        public async Task <ActionResult> ImportFromJob(int examid)
        {
            var examPlan = await this.examManager.FindByIdAsync(examid);

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

            this.ViewData["JobList"] = this.GetSelectableJobList();
            var model = new ImportFromJobEditModel();

            return(View(model));
        }
示例#2
0
        public async Task <ActionResult> ImportFromJob(int examid, ImportFromJobEditModel model)
        {
            this.ViewData["JobList"] = this.GetSelectableJobList();

            if (!this.ModelState.IsValid)
            {
                return(View(model));
            }

            var examPlan = await this.examManager.FindByIdAsync(examid);

            var job = await this.jobStore.FindByIdAsync(model.SelectedJobId);

            await this.candidateManager.ImportFromJobAsync(examPlan, job);

            return(RedirectToAction("Detail", new { id = examid }));
        }