private void 修改工程ToolStripMenuItem_Click(object sender, EventArgs e) { string proID = dgvProject.CurrentRow.Cells[0].Value.ToString(); if (string.IsNullOrEmpty(proID)) { Common.MessageBoxShow("没有工程ID"); } Project pro = ProjectBLL.GetProjectByProID(int.Parse(proID)); if (pro == null) { Common.MessageBoxShow("没有工程"); } frmEventArgs fea = new frmEventArgs(); fea.obj = pro; AddProject ap=new AddProject(); this.myEvt += new EventHandler(ap.SetData); if (myEvt!=null) { myEvt(this, fea); } ap.FormClosing += ap_FormClosing; ap.ShowDialog(); }
private void 添加跟进记录ToolStripMenuItem_Click(object sender, EventArgs e) { string proID = dgvProject.CurrentRow.Cells[0].Value.ToString(); Project pro = ProjectBLL.GetProjectByProID(int.Parse(proID)); if (pro == null) { MessageBox.Show("不好意思出错了"); return; } AddContactRecord acr = new AddContactRecord(); frmEventArgs fea = new frmEventArgs(); fea.obj = pro; this.myEvt += new EventHandler(acr.SetData); if (this.myEvt != null) { this.myEvt(this, fea); } acr.FormClosed += acr_FormClosed; acr.Show(); }