private void btnAdd_Click(object sender, EventArgs e) { frmPackingSlip fmAdd = new frmPackingSlip(); fmAdd.MdiParent = this.MdiParent; fmAdd.Show(); this.Close(); }
void EditData() { if (dgDisplayData.SelectedRows.Count > 0) { int ID = 0; int.TryParse(dgDisplayData.CurrentRow.Cells["T010_PACKINGSLIPID"].Value.ToString(), out ID); Datalayer.T010_PACKINGSLIPID = ID; frmPackingSlip frmAddSTD = new frmPackingSlip(); frmAddSTD.MdiParent = this.MdiParent; frmAddSTD.Show(); this.Close(); } else { Datalayer.InformationMessageBox(Datalayer.sMeessgeSelection); } }