Esempio n. 1
0
 /// <summary>
 /// 显示添加添加工程窗口
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAddProject_Click(object sender, EventArgs e)
 {
     AddProject pro = new AddProject();
     pro.evtClosing += pro_evtClosing;
     //pro.Owner = this;
     //pro.FormClosing += BindDgvProject;
     pro.ShowDialog();
 }
Esempio n. 2
0
 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();
 }