private void DbHelperReadSecondPage(object val)
        {
            IPageSplit ps = gateway.DbHelper.SelectPageSplit("Orders", new string[] { "*" }, "OrderID > @OrderID", "OrderID desc", "OrderID", new object[] { 10 });

            ps.PageSize = 100;
            DataSet ds = ps.GetPage(2);

            ds = null;
            ps = null;
        }
        private object DbHelperReadFirstPage()
        {
            IPageSplit ps = gateway.DbHelper.SelectPageSplit("Orders", new string[] { "*" }, "OrderID > @OrderID", "OrderID desc", "OrderID", new object[] { 10 });

            ps.PageSize = 100;
            DataSet ds = ps.GetPage(1);

            ds = null;
            ps = null;
            return(null);
        }
Beispiel #3
0
        public static DataSet FindList(string fields, string tablename, string keyId, string order, string expression, int PageSize, int PageIndex, out int RowCount)
        {
            string SelectSql = string.Format("SELECT {0} from {1}", fields, tablename);

            if (expression != null && expression != string.Empty)
            {
                SelectSql = SelectSql + " WHERE " + expression;
            }
            SelectSql += order;
            Gateway    gateway   = Gateway.Default;
            IPageSplit PageSplit = gateway.Db.GetPageSplit(SelectSql, keyId, null);

            PageSplit.PageSize = PageSize;
            RowCount           = PageSplit.GetRowCount();
            DataSet ds = PageSplit.GetPage(PageIndex);

            return(ds);
        }