Exemplo n.º 1
0
 private void OpenFrmUser()
 {
     if (Application.OpenForms.OfType <FrmUser>().Count() > 0)
     {
         frmUser.Close();
     }
     if (Application.OpenForms.OfType <FrmUser>().Count() == 0)
     {
         frmUser = new FrmUser("Utilizadores - Consultar");
     }
     frmUser.MdiParent   = this;
     frmUser.WindowState = FormWindowState.Maximized;
     frmUser.Show();
     frmUser.BringToFront();
 }
Exemplo n.º 2
0
 private void inserirUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <FrmUser_InsertUpdate>().Count() == 0)
     {
         frmUser_InsertUpdate = new FrmUser_InsertUpdate(true);
     }
     //FrmUser_InsertUpdate.MdiParent = this;
     frmUser_InsertUpdate.BringToFront();
     frmUser_InsertUpdate.ShowDialog();
     if (Application.OpenForms.OfType <FrmUser>().Count() == 0)
     {
         frmUser = new FrmUser("Utilizadores - Alterar");
     }
     else
     {
         frmUser.Close();
         frmUser = new FrmUser("Utilizadores - Alterar");
     }
     frmUser.MdiParent   = this;
     frmUser.WindowState = FormWindowState.Maximized;
     frmUser.Show();
     frmUser.BringToFront();
 }