private void viewPurchaseOrderToolStripMenuItem_Click(object sender, EventArgs e) { if (VPO == null) { VPO = new ViewPurchaseOrder(); VPO.MdiParent = this; VPO.FormClosed += new FormClosedEventHandler(VPO_FormClosed); VPO.Show(); // this.Close(); } else { VPO.Activate(); } }
private void dataGridView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { purchaseOrder = this.dataGridView2.CurrentRow.Cells[0].Value.ToString(); if (vpo == null) { vpo = new ViewPurchaseOrder(); vpo.MdiParent = this.MdiParent; vpo.FormClosed += new FormClosedEventHandler(vpo_FormClosed); vpo.Show(); //this.Close(); } else { vpo.Activate(); vpo.FormClosed += new FormClosedEventHandler(vpo_FormClosed); vpo.Show(); } }
void VPO_FormClosed(object sender, FormClosedEventArgs e) { VPO = null; }
void vpo_FormClosed(object sender, FormClosedEventArgs e) { vpo = null; }