public JsonResult GetPage(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<Product> datalist = ProductService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     page.content = datalist.ToList();
     return Json(page, JsonRequestBehavior.AllowGet);
 }
 //private static readonly string url = System.Web.HttpContext.Current.Request.UrlReferrer.GetLeftPart(UriPartial.Authority);
 //Guid cid = WebSitesService.instance().GetCompanyIDByHTTP(url);
 /// <summary>
 /// 获取分页
 /// </summary>
 /// <param name="pageIndex">当前页码</param>
 /// <param name="pageSize">每页显示多少条</param>
 /// <param name="wheres">查询条件</param>
 /// <param name="sortorder">倒序/正序</param>
 /// <param name="sortname">排序字段</param>
 /// <returns></returns>
 public HttpResponseMessage Get(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<News> datalist = NewsService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     page.content = datalist;
     return Util.Utils.ConvertToJson(page);
 }
 public JsonResult GetPage(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<USER> datalist = UserService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     datalist.Each(m => m.CompanyName = CompanyService.instance().GetNameByID(m.CompanyID));
     page.content = datalist.ToList();
     return Json(page, JsonRequestBehavior.AllowGet);
 }
 public JsonResult GetPage(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<Authority> datalist = AuthorityService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     datalist.Each(m =>
     {
         m.PIDName = AuthorityService.instance().GetNameByPID(m.PID);
         m.Childs = AuthorityService.instance().GetEnumByPID(m.ID).OrderBy(n => n.Sort);
     });
     page.content = datalist.ToList();
     return Json(page, JsonRequestBehavior.AllowGet);
 }
 //private static readonly string url = System.Web.HttpContext.Current.Request.UrlReferrer.GetLeftPart(UriPartial.Authority);
 //Guid cid = WebSitesService.instance().GetCompanyIDByHTTP(url);
 /// <summary>
 /// 获取分页
 /// </summary>
 /// <param name="pageIndex">当前页码</param>
 /// <param name="pageSize">每页显示多少条</param>
 /// <param name="wheres">查询条件</param>
 /// <param name="sortorder">倒序/正序</param>
 /// <param name="sortname">排序字段</param>
 /// <returns></returns>
 public HttpResponseMessage Get(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<Product> datalist = ProductService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     if (datalist.Count() > 0)
     {
         datalist.ToList().ForEach(m =>
         {
             m.Attr = Product_AttService.GetAttsByPID(m.ID);
         });
     }
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     page.content = datalist;
     return Util.Utils.ConvertToJson(page);
 }
 public JsonResult GetMessagePage(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<WX_Message> datalist = WX_MessageService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     datalist.Each(m =>
     {
         m.Groups = WX_MessageGroupService.instance().GetEnumByMessID(m.ID).OrderBy(n => n.Short);
     });
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     page.content = datalist.ToList();
     return Json(page, JsonRequestBehavior.AllowGet);
 }
 public JsonResult GetMenuPage(int pageIndex, int pageSize, string wheres, string sortorder, string sortname)
 {
     int totalcount = 0;
     IEnumerable<WX_Menu> datalist = WX_MenuService.instance().GetPageByDynamic(pageIndex, pageSize, out totalcount, sortname, sortorder, wheres);
     datalist.Each(m =>
     {
         m.Childs = WX_MenuService.instance().GetChilds(m.ID);
         m.KeyWord = WX_KeyWordService.instance().GetEnumerableByID(m.KeyWordID).FirstOrDefault();
     });
     ResultBase_Page page = new ResultBase_Page(pageIndex, pageSize, totalcount);
     page.content = datalist.ToList();
     return Json(page, JsonRequestBehavior.AllowGet);
 }