private void Btn_Add_Click(object sender, EventArgs e) { frmModifyTitle = "新增账单"; FormAdd frmAdd = new FormAdd(); frmAdd.ShowDialog(); if (Clipboard.GetText().ToString().Equals("确定")) { listView_ShowData.Items.Clear(); listShowData(); // 显示数据 } }
private void Btn_Modify_Click(object sender, EventArgs e) { GetDataFromListView(); if (listView_ShowData.SelectedItems.Count == 0) { MessageBox.Show("请选择一条记录进行修改", "温馨提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } frmModifyTitle = "修改账单"; FormAdd frmModify = new FormAdd(); frmModify.ShowDialog(); if (Clipboard.GetText().ToString().Equals("确定")) { listView_ShowData.Items.Clear(); listShowData(); // 显示数据 } }