/// <summary>
 /// 问题列表
 /// </summary>
 public ActionResult AdminProblems(int? pageNo, int? tid, int? layer, int? cid, string sort, string order)
 {
     Problems clsProblems = new Problems();
     Category clsCategory = new Category();
     Pager pager = new Pager();
     int typeid = tid ?? 0;
     int layerid = layer ?? 0;
     int cateid = cid ?? 0;
     pager.PageNo = pageNo ?? 1;
     pager.PageSize = 10;
     if (cateid > 0)
         pager = clsProblems.GetReplyPaging(pager,  clsCategory.GetCategoryIds(cateid),  sort, string.IsNullOrWhiteSpace(order) ? "desc" : order);
     else
         pager = clsProblems.GetReplyPaging(pager,  cateid, sort, string.IsNullOrWhiteSpace(order) ? "desc" : order);
     ViewBag.PageNo = pageNo ?? 1;//页码
     ViewBag.PageCount = pager.PageCount;//总页数
     ViewBag.TypeId = typeid;
     ViewBag.LayerId = layerid;
     ViewBag.Cid = cateid;
     ViewBag.Sort = sort;
     ViewBag.Order = order;
     List<CategoryModel> catelist = clsCategory.getFCategoryList(typeid.ToString(), "", " -- ");
     catelist.Insert(0, new CategoryModel
       {
       CateId = "0",
       CateName = res.SelectSubcategories
       });
     ViewBag.CurrentItem = layerid > 0 ? "l" + layerid.ToString() : "t" + typeid.ToString();
     ViewData["CateId"] = new SelectList(catelist, "CateId", "CateName", cateid);
     return View(pager.Entity);
 }
 //问题列表
 // GET: /Problems/
 public ViewResult Index(int? pageNo, int? cid, string sort, string order)
 {
     Problems clsProblems = new Problems();
     Category clsCategory = new Category();
     Pager pager = new Pager();
     int cateid = cid ?? 0;
     pager.PageNo = pageNo ?? 1;
     pager.PageSize = 20;
     if (cateid > 0)
         pager = clsProblems.GetReplyPaging(pager, clsCategory.GetCategoryIds(cateid), sort, string.IsNullOrWhiteSpace(order) ? "desc" : order, User.Identity.Name);
     else
         pager = clsProblems.GetReplyPaging(pager, cateid, sort, string.IsNullOrWhiteSpace(order) ? "desc" : order, User.Identity.Name);
     ViewBag.PageNo = pageNo ?? 1;//页码
     ViewBag.PageCount = pager.PageCount;//总页数
     ViewBag.Cid = cateid;
     ViewBag.Sort = sort;
     ViewBag.Order = order;
     List<CategoryModel> catelist = clsCategory.getFCategoryList("1", "", " -- ");
     catelist.Insert(0, new CategoryModel
     {
         CateId = "0",
         CateName = res.SelectSubcategories
     });
     ViewData["CateId"] = new SelectList(catelist, "CateId", "CateName", cateid);
     return View(pager.Entity);
 }