public string GetTypes() { 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"]); ContentBLL bll = new ContentBLL(); TableModel <TypeModel> info = bll.GetTypes(search, index, page, total); var res = JsonConvert.SerializeObject(info); return("success:" + res.ToString()); } catch (Exception ex) { Log.WriteFile(ex); return("failure:失败"); } }