public async Task <ActionResult> Index() { ViewBag.Staff = (SysConfigRepository.StaffPic == null ? "" : string.Join("|", SysConfigRepository.StaffPic)); ViewBag.Case = await ArticleRepository.GetListByTreePathAsync(ClassifyRepository.QueryUnDelete(), SysConfigRepository.CaseClassifyId.ToString(ArticleClassifyRepository.TreePathFormat)); ViewBag.Job = await RecruitJobRepository.GetListAsync(); return(View()); }
public async Task <ActionResult> CaseDetail(long id) { if (id < 1) { return(RedirectTo404(Url.Action("Index"), "找不到记录!")); } var article = await ArticleRepository.GetEnableByIdAsync(id); if (article == null) { return(RedirectTo404(Url.Action("Index"), "找不到记录!")); } ViewBag.Random = await ArticleRepository.GetListByRandomAsyn(ClassifyRepository.QueryUnDelete(), SysConfigRepository.CaseClassifyId.ToString(ArticleClassifyRepository.TreePathFormat), 4, article.Id); return(View(article)); }