init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user