Example #1
0
 /// <summary>
 /// 文章管理页面
 /// </summary>
 /// <returns></returns>
 //[OutputCache(CacheProfile = "Long")]
 public string GetCList()
 {
     try
     {
         //搜索内容
         string search = Request["txt_search"] ?? "";
         //页码
         int index = Convert.ToInt32(Request["index"] == "" || Request["index"] == null ? "1" : Request["index"]);
         //每页取几条数据
         int page = Convert.ToInt32(Request["pagesize"]);
         //总数
         int total = Convert.ToInt32(Request["Total"]);
         //类别id
         int                       typeId = Convert.ToInt32(Request["typeId"]);
         ContentBLL                bll    = new ContentBLL();
         List <TypeModel>          tlist  = bll.GetTyleList();
         TableModel <ContentModel> info   = bll.GetContentList(search, index, page, total, typeId);
         var                       res    = JsonConvert.SerializeObject(info);
         return("success:" + res.ToString());
     }
     catch (Exception ex)
     {
         Log.WriteFile(ex);
         return("failure:失败");
     }
 }