예제 #1
0
        private string getDataList0(HttpContext context)
        {
            StringBuilder strWhere = new StringBuilder();

            strWhere.Append(" is_delete != 1");
            strWhere.AppendFormat(" and parent_id  = 0");
            WK.BLL.bus_area bll = new WK.BLL.bus_area();
            DataSet         ds  = new DataSet();

            ds = bll.GetListByPageInfo(strWhere.ToString(), "", 0, 100);
            return(Newtonsoft.Json.JsonConvert.SerializeObject(ds.Tables[0]));
        }
예제 #2
0
        private string getDataList(HttpContext context)
        {
            StringBuilder strWhere = new StringBuilder();

            strWhere.Append(" is_delete != 1");
            StringBuilder orderby = new StringBuilder();

            orderby.Append("parent_id,id");

            int pageIndex  = int.Parse(context.Request.Params["pageIndex"]);
            int pageSize   = int.Parse(context.Request.Params["pageSize"]);
            int startIndex = 0;

            if (pageIndex >= 0)
            {
                startIndex = pageSize * pageIndex;
            }

            WK.BLL.bus_area bll = new WK.BLL.bus_area();
            DataSet         ds  = new DataSet();

            ds = bll.GetListByPageInfo(strWhere.ToString(), orderby.ToString(), startIndex, pageSize);
            return(Newtonsoft.Json.JsonConvert.SerializeObject(ds.Tables[0]));
        }