// GET: Article public ActionResult Index(int?id) { if (id == null) { return(RedirectToAction("Index", "Home")); } try { var model = artBll.FindById(id.Value); return(View(model)); } catch (Exception ex) { return(View(new Gift_Article())); } }
/// <summary> /// 转到文章详情页面 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Article(int?id) { try { if (id == null) { return(View("ArticleList")); } var model = artBll.FindById(id.Value); var Category = new SysConfigBLL().GetArticleCategorys(); ViewData["Category"] = Category; return(View(model)); } catch (Exception ex) { return(View(new Qq_Article())); } }