Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
 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");
         }
     }
 }
Exemplo n.º 2
0
 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");
         }
     }
 }