private void btnAdd_Click(object sender, EventArgs e) { FrmAddReceiptInfo frm = new FrmAddReceiptInfo(LoadDataToDataGridView, _curPage); if (DialogResult.Cancel == frm.ShowDialog()) { return; } }
private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) { var list = GetSelectedModelList(); if (list.Count > 1) { MessageBoxEx.Show("请选中一条进行修改!"); return; } FrmAddReceiptInfo frm = new FrmAddReceiptInfo(LoadDataToDataGridView, _curPage, true, list[0]); frm.ShowDialog(); }