Beispiel #1
0
        public static string GetStrJson(string strWhere, string orderby, int startIndex, int endIndex) //static有无
        {
            DAL.DALServer dll = new DAL.DALServer();                                                   //C#非静态的字段要求对象引用

            DataSet ds      = dll.GetListByPage(strWhere, orderby, startIndex, endIndex);
            int     count   = dll.GetRecordCount(strWhere);
            string  strJson = ToJson.Dataset2Json(ds, count);

            return(strJson);
            //throw new NotImplementedException();
        }
Beispiel #2
0
    protected void GetList_Cancel()
    {
        LEANJU.BLL.Orders bll  = new LEANJU.BLL.Orders();
        int          pagesize  = int.Parse(Request.Form["rows"].ToString().Trim());
        int          pageindex = int.Parse(Request.Form["page"].ToString().Trim());
        DataGridData dgd       = new DataGridData();

        dgd.total = bll.GetRecordCount("Ostate='已取消'");

        dgd.rows = bll.GetListByPage("Ostate='已取消'", "", (pageindex - 1) * pagesize + 1, pageindex * pagesize);
        WriteMessage("", ToJson.Dataset2Json(dgd.rows, dgd.total));
    }