private void button1_Click(object sender, EventArgs e)
 {
     frmMainMenu myForm = (frmMainMenu)Application.OpenForms["frmMainMenu"];
     frmPersonType frm = new frmPersonType() { MdiParent = myForm };
     frm.Show();
     Close();
 }
 private void updateToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmMainMenu myForm = (frmMainMenu)Application.OpenForms["frmMainMenu"];
         PersonType selectPersonType = GetSelectedPersonType();
         frmPersonType frmPersonType = new frmPersonType(selectPersonType){MdiParent = myForm};
         frmPersonType.Show();
         Close();
         //GetData();
         //resultListView.HideSelection = false;
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void companyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPersonType frm = new frmPersonType(){MdiParent = this};
            panel1.Visible = false;
            panel2.Visible = false;

            frm.Show();
        }