Ejemplo n.º 1
0
        /// <summary>
        /// 查询物品
        /// </summary>
        /// <param name="context"></param>
        private void SearchGoods(HttpContext context)
        {
            string sort      = context.Request.Params["sort"];  //排序列
            string order     = context.Request.Params["order"]; //排序方式 asc或者desc
            int    pageindex = int.Parse(context.Request.Params["page"]);
            int    pagesize  = int.Parse(context.Request.Params["rows"]);

            int    totalCount; //输出参数
            string strJson = goodsBll.GetPagerData(sort + " " + order, pagesize, pageindex, out totalCount);

            context.Response.Write("{\"total\": " + totalCount.ToString() + ",\"rows\":" + strJson + "}");

            userOperateLog.OperateInfo = "查询物品";
            userOperateLog.IfSuccess   = true;
            userOperateLog.Description = "排序:" + sort + " " + order + " 页码/每页大小:" + pageindex + " " + pagesize;
            DriveMgr.BLL.UserOperateLog.InsertOperateInfo(userOperateLog);
        }