public async Task <IActionResult> SelProject(int reviewId) { var review = await ReviewRepository.GetAllIncluding(o => o.Major).Where(o => o.Id == reviewId).SingleAsync(); List <Major> subMajors = new List <Major>(); if (review.SubMajorId == null) { //如果未指定专业小类,需要列出所有专业小类供查询 subMajors = await MajorManager.FindChildrenAsync(null, review.MatchInstanceId, review.MajorId); } else { ViewBag.SubMajor = await MajorManager.GetByIdAsync(review.SubMajorId.Value); } ViewBag.SubMajors = subMajors; ViewBag.Exclude = Request.Cookies["excludeProjects"]; return(View(review)); }
public async Task <IActionResult> SelExcludeExpert(int reviewId) { var review = await ReviewRepository.GetAllIncluding(o => o.Major).Where(o => o.Id == reviewId).SingleAsync(); List <Major> subMajors = new List <Major>(); if (review.SubMajorId == null) { //如果未指定专业小类,需要列出所有专业小类供查询 subMajors = await MajorManager.FindChildrenAsync(null, review.MatchInstanceId, review.MajorId); } else { ViewBag.SubMajor = await MajorManager.GetByIdAsync(review.SubMajorId.Value); } ViewBag.SubMajors = subMajors; ViewBag.Exclude = Request.Cookies["excludeExperts"]; ViewBag.AllExpertIds = Request.Cookies["allExpertIds"]; var specialities = await SpecialityManager.GetAll().OrderBy(o => o.Name).ToListAsync(); ViewBag.Specialities = specialities; return(View(review)); }