private void dgvExt_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e) { if (this.dgvExt.CurrentRow == null) { MessageBox.Show("请选择需要修改的记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); return; } else { FrmEditComboValue frmedit = new FrmEditComboValue(); frmedit.SelectedComboBoxItem = _comboValue.GetComboBoxItemByComboID(this.dgvExt.CurrentRow.Cells["COMBID"].Value.ToString()); frmedit.ShowDialog(); if (frmedit.DialogResult == DialogResult.OK) { this.dgvExt.DataSource = helper.getDataTableBySql("*", "", "ComboBoxValue"); } } }
private void tspModify_Click(object sender, EventArgs e) { if (this.dgvExt.CurrentRow == null) { MessageBox.Show("请选择需要修改的记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); return; } else { FrmEditComboValue frmedit = new FrmEditComboValue(); frmedit.SelectedComboBoxItem = _comboValue.GetComboBoxItemByComboID(this.dgvExt.CurrentRow.Cells["COMBID"].Value.ToString()); frmedit.ShowDialog(); if (frmedit.DialogResult == DialogResult.OK) { this.dgvExt.DataSource = helper.getDataTableBySql("*", "", "ComboBoxValue"); } } }