/// <summary> /// 数据查询,绑定 /// </summary> private void BindData(int currentPage) { string strWhere = getConduction(); DataSet ds = bCommon.GetMasterDataList(_tableName, txtCode.Text.Trim(), txtName.Text.Trim(), strWhere, (currentPage - 1) * _pageSize + 1, currentPage * _pageSize); _currentDt = ds.Tables[0]; ReSetCurrentDt(); for (int i = _currentDt.Rows.Count; i < _pageSize; i++) { _currentDt.Rows.Add(ds.Tables[0].NewRow()); } this.dgvData.DataSource = _currentDt; }