日期:2014-05-17 浏览次数:20828 次
int currPage = 1;
int PageSize =40;
string tabeName = "TableOrders as a left join Customer as b on a.CustomerID=b.CustomerID left join UseCompanyIp as c on a.OrderID=c.OrderID left join Staff as e on a.StaffID=e.StaffID";
string strFide = "(a.RenewalFee+a.ModificationCost) AS moneycount,a.PaymentCycle,a.ModificationCost,a.SerialNumber,a.state,a.Technology,a.RenewalStatus,a.RenewalFee,a.OldExpirationDate,a.RenewalDate,a.OrderID,a.OrderDate,a.ExpirationDate,a.Remarks,a.StaffID,a.CustomerID,a.PackageID,a.ProductID,b.CustomerName,b.Taofc,c.IpAddress,e.StaffName";
string strSortKey = "a.OrderID";
string strSortField = "a.ExpirationDate ";
public void Bind()
{
int pageCount;
int RecordCount;
Repeater1.DataSource = tableorder.GetPagetable(tabeName, strFide, PageSize,currPage, out pageCount, out RecordCount, strSortField, strSortKey);
Repeater1.DataBind();
this.AspNetPager1.RecordCount = RecordCount;
this.AspNetPager1.CurrentPageIndex = currPage;
this.AspNetPager1.PageSize = PageSize;
}
public DataTable GetPagetable(string TableNames, string Fields, int PageSize, int page, out int pageCount, out int RecordCount, string fldSort, string ID)
{
pageCount = 0;
RecordCount = 0;
DataTable datatable = new DataTable();
using (SqlConnection conn = new SqlConnection(SQLHelper.scon))
{
SqlCommand objcmd = new SqlCommand("proc_ListPage", conn);
objcmd.CommandType = CommandType.StoredProcedure;
SqlParameter[] para ={
new SqlPa