/// <summary> /// 查询 /// </summary> private void Search(int currentPage) { string strWhere = getConduction(); int recordCount = bCommon.GetMasterRecordCount(_tableName, txtCode.Text.Trim(), txtName.Text.Trim(), strWhere); if (recordCount == 0) { MessageBox.Show("查询的信息不存在!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } if (recordCount > CConstant.MAX_MASTER_PAGE_SIZE) { //分页标签初始化 _pageSize = MasterMinPageSize - 1; pgControlMin.Visible = true; pgControlMin.init(GetTotalPage(recordCount, _pageSize), currentPage); //数据绑定 BindData(currentPage); } else { _pageSize = MasterMinPageSize; pgControlMin.Visible = false; BindData(); } }