private void uiSinsert_Click(object sender, EventArgs e) { buy.orederEdit orderedit = new orederEdit(); orderedit.Flag = "insert"; // 是否正常打开窗口 if (orderedit.ShowDialog() == DialogResult.OK) { setUIDataGV(); } }
private void uiSupdate_Click(object sender, EventArgs e) { if (uiDataGridView1.SelectedRows.Count > 0) { string id = uiDataGridView1[0, uiDataGridView1.CurrentCell.RowIndex].Value.ToString(); buy.orederEdit orderedit = new orederEdit(); orderedit.Flag = "update|" + id; // 是否正常打开窗口 if (orderedit.ShowDialog() == DialogResult.OK) { setUIDataGV(); } } }