public ActionResult CashBackGrid() { string where = ""; string strCurPage; string strRowNum; string CID = ""; if (Request["curpage"] != null) { strCurPage = Request["curpage"].ToString(); } if (Request["rownum"] != null) { strRowNum = Request["rownum"].ToString(); } else { strRowNum = "10"; } if (Request["Cid"] != null) { CID = Request["Cid"].ToString(); } if (CID != "") { where += " and a.CID = '" + CID + "'"; } UIDataTable udtTask = new UIDataTable(); if (where != "") { udtTask = ContractMan.getNewCashBackGrid(GFun.SafeToInt32(strRowNum), GFun.SafeToInt32(Request["curpage"]) - 1, where); } string strjson = GFun.Dt2Json("", udtTask.DtData); strjson = strjson.Substring(1); strjson = strjson.Substring(0, strjson.Length - 1); string jsonData = "{ \"page\":" + GFun.SafeToInt32(Request["curpage"]) + ", \"total\": " + udtTask.IntTotalPages + ", \"records\": " + udtTask.IntRecords + ", \"rows\": "; jsonData += strjson + "}"; return(Json(jsonData, JsonRequestBehavior.AllowGet)); }