/// <summary> /// 首页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnFirst_Click(object sender, EventArgs e) { curPage = 1; DataTable dat = BoroowMgr.getSortEqList(0, pageCount, _departId, _power, SelectedColumns, SortsString, OrderByString[0]); if (dat != null) { //绑定数据 dbgBorrow.DataSource = dat.DefaultView; } this.lblCurPage.Text = "第" + curPage.ToString() + "页"; }
/// <summary> /// 刷新筛选数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataRefreshBySQLSort() { DataTable dat = BoroowMgr.getSortEqList((curPage - 1) * pageCount, pageCount, _departId, _power, SelectedColumns, SortsString, OrderByString[0]); if (dat != null) { TotalPage = this.getTotalPage();//得到数据的总页数 dbgBorrow.DataSource = dat.DefaultView; } this.lblTotalpage.Text = "共" + TotalPage.ToString() + "页"; this.lblCurPage.Text = "第" + curPage.ToString() + "页"; SetupControlsPosition(); }