private void Modify() { var dialog = new FormGroupDetail((int)this.dgvGroupList.CurrentRow.Cells[0].Value); dialog.ShowDialog(); this.Fill(); }
private void btnModify_Click(object sender, EventArgs e) { int id = 0; try { id = (int)dgvGroupList.CurrentRow.Cells[0].Value; } catch (System.Exception ex) { MessageBox.Show("请选择有效数据行!"); return; } FormGroupDetail f = new FormGroupDetail(id); f.ShowDialog(); Fill(); }