private void newPOToolStripMenuItem_Click(object sender, EventArgs e) { FrmDEntry frm = new FrmDEntry(); frm.MdiParent = this; frm.Show(); }
private void dgvOrders_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgvOrders.Rows[e.RowIndex].DefaultCellStyle.BackColor != Color.WhiteSmoke) { FrmDEntry frm = new FrmDEntry(); frm.MdiParent = this.ParentForm; frm.IsEditMode = true; frm.Show(); try { TextBox myControl1 = (TextBox)this.ParentForm.ActiveMdiChild.Controls.Find("txtPONumber", true)[0]; myControl1.Text = dgvOrders.Rows[e.RowIndex].Cells[1].Value.ToString(); } catch { } } }