sigh
DRL的Blog貌似就这样走了~
初始化DataGrid#region 初始化DataGrid
/**//// <summary>
/// 初始化DataGrid
/// </summary>
private void iniData(DataTable dt)
{
int pagesum = 0;
int intDataViewCount = dt.DefaultView.Count;
int intDataGridPageSize = dgResult.PageSize;
int intDataGridCurrentPageIndex = dgResult.CurrentPageIndex;
if(intDataViewCount % intDataGridPageSize == 0)
{
pagesum = intDataViewCount/intDataGridPageSize;
}
else
{
pagesum = intDataViewCount/intDataGridPageSize + 1;
}
if(intDataViewCount == 0)
{
pagesum =1;
}
if(intDataGridCurrentPageIndex >= pagesum)
{
intDataGridCurrentPageIndex = pagesum-1;
}
dgResult.CurrentPageIndex = intDataGridCurrentPageIndex;
}
#endregion
/**//// <summary>
/// 初始化DataGrid
/// </summary>
private void iniData(DataTable dt)
{
int pagesum = 0;
int intDataViewCount = dt.DefaultView.Count;
int intDataGridPageSize = dgResult.PageSize;
int intDataGridCurrentPageIndex = dgResult.CurrentPageIndex;
if(intDataViewCount % intDataGridPageSize == 0)
{
pagesum = intDataViewCount/intDataGridPageSize;
}
else
{
pagesum = intDataViewCount/intDataGridPageSize + 1;
}
if(intDataViewCount == 0)
{
pagesum =1;
}
if(intDataGridCurrentPageIndex >= pagesum)
{
intDataGridCurrentPageIndex = pagesum-1;
}
dgResult.CurrentPageIndex = intDataGridCurrentPageIndex;
}
#endregion