Files
lserp_cs_5.0/插件库/Zhaizj.Framework/ORM/Operation/PageCondition.cs
T
2026-07-10 15:25:05 +08:00

36 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Zhaizj.Framework.Data;
namespace Zhaizj.Framework.ORM.Operation {
internal class PageCondition {
private static readonly ILog logger = LogManager.GetLogger( typeof( PageCondition ) );
public String ConditionStr { get; set; }
public String Property { get; set; }
public int CurrentPage { get; set; }
public int Size { get; set; }
public String OrderStr { get; set; }
public ObjectPage Pager { get; set; }
public int beginCount( String countSql, ObjectPage pager, EntityInfo entityInfo ) {
String commandText = countSql;
logger.Info( "[Page Record Count] " + commandText );
IDbCommand command = DataFactory.GetCommand( commandText, DbContext.getConnection( entityInfo ) );
pager.RecordCount = cvt.ToInt( command.ExecuteScalar() );
pager.computePageCount();
pager.resetCurrent();
return pager.getCurrent();
}
}
}