private void btnNewOrd_Click(object sender, EventArgs e) { FrmSetOrdEditTable edit = new FrmSetOrdEditTable(0); if (edit.ShowDialog() == DialogResult.OK) { frmSetInfo_Load(null, null); } }
private void btnEditOrd_Click(object sender, EventArgs e) { if (grdTable.SelectedRows.Count == 0) { MessageBox.Show(@"请选择要修改的记录"); return; } if (grdTable.CurrentRow != null) { int id = Convert.ToInt32(grdTable.CurrentRow.Cells[0].Value.ToString().Trim()); FrmSetOrdEditTable edit = new FrmSetOrdEditTable(id); if (edit.ShowDialog() == DialogResult.OK) { frmSetInfo_Load(null, null); } } }