Example #1
0
        public string GetPageSet(int pageIndex, int pageSize, string tableName, string where, string urlFormat, int mode)
        {
            ISession session     = SessionFactory.OpenSession(this._AssemblyName);
            int      recordCount = DirectRun.GetRecordCount(session, tableName, where);

            session.Close();
            session.Dispose();
            return(SplitPage.GetPageSet(pageIndex, pageSize, recordCount, urlFormat, mode));
        }
Example #2
0
        public static string GetPageSet(int pageIndex, int pageSize, int recordCount, string urlFormat, int mode)
        {
            string result;

            switch (mode)
            {
            case 0:
                result = SplitPage.GetPageSet0(pageIndex, pageSize, recordCount, urlFormat);
                break;

            case 1:
                result = SplitPage.GetPageSet1(pageIndex, pageSize, recordCount, urlFormat);
                break;

            default:
                result = SplitPage.GetPageSet0(pageIndex, pageSize, recordCount, urlFormat);
                break;
            }
            return(result);
        }