示例#1
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     int pageSize = Commons.WebPage.PageRequest.GetFormInt("rows");
     int index = Commons.WebPage.PageRequest.GetFormInt("page");
     int ptID = Commons.WebPage.PageRequest.GetFormInt("ptID");
     List<Model.products.productsInfo> lists = new List<Model.products.productsInfo>();
     skywolfORM.ORM.ORM orm = new skywolfORM.ORM.ORM();
     Model.products.productsInfo model = new Model.products.productsInfo();
     string strWhere = "";
     if (ptID > 0)
     {
         strWhere = "ptID=" + ptID;
     }
     lists = orm.ListPage(model, strWhere, "piID", pageSize, index).OfType<Model.products.productsInfo>().ToList();
     string str = Newtonsoft.Json.JsonConvert.SerializeObject(lists);
     context.Response.Write(str);
 }