public void FindMyOrder() { string rows = Context.Request.Form["rows"]; string page = Context.Request.Form["page"]; string orderNo = Context.Request.Form["orderNo"]; string partsdrawing = Context.Request.Form["partsdrawing"]; string productname = Context.Request.Form["productname"]; int count = _bal.FindMyOrderCount(orderNo, partsdrawing, productname); // DataSet ds = _bal.FindMyOrder(orderNo, partsdrawing,rows,page); IList <OrderDetail> ods = _bal.FindMyOrder(orderNo, partsdrawing, rows, page); //by tony modify 2017-6-3 if (ods != null && ods.Count > 0) { foreach (OrderDetail od in ods) { od.CreatedBy = FindUserNameByCode(od.CreatedBy); } } Dictionary <String, Object> map = new Dictionary <String, Object>(); //if (count>0) //{ map.Add("total", count); map.Add("rows", ods); //} string restemp = JsonConvert.SerializeObject(map); Context.Response.Write(JsonConvert.SerializeObject(map)); }