Пример #1
0
        /// <summary>
        /// 刷新筛选数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DataRefreshBySQL()
        {
            DataTable dat = FixMgr.getSortEqList((curPage - 1) * pageCount, pageCount, _departId, _power, SelectedColumns, SortsString, OrderByString[0]);

            if (dat != null)
            {
                TotalPage         = this.getTotalPage();//得到数据的总页数
                dbgFix.DataSource = dat.DefaultView;
            }
            this.lblTotalpage.Text = "共" + TotalPage.ToString() + "页";
            this.lblCurPage.Text   = "第" + curPage.ToString() + "页";
        }
Пример #2
0
        /// <summary>
        /// 首页
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFirst_Click(object sender, EventArgs e)
        {
            curPage = 1;
            DataTable dat = FixMgr.getSortEqList(0, pageCount, _departId, _power, SelectedColumns, SortsString, OrderByString[0]);

            if (dat != null)
            {
                //绑定数据
                dbgFix.DataSource = dat.DefaultView;
            }
            this.lblCurPage.Text = "第" + curPage.ToString() + "页";
        }