private void menuUsuarios_Click(object sender, EventArgs e) { bool found = false; foreach (Form form in Application.OpenForms) { if (form is FrmUsuarios) { form.Focus(); found = true; } } if (!found) { FrmUsuarios frmUsuarios = new FrmUsuarios(); frmUsuarios.MdiParent = this; frmUsuarios.Show(); } }
public void LanzaFormaInsert(string NodoName, dynamic Mdi) { dynamic form; switch (NodoName) { case "NodoClientes": form = new FrmClientes(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoProveedores": form = new FrmProveedores(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoProductos": form = new FrmProductos(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoCategorias": form = new FrmCategorias(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoLaboratorios": form = new FrmLaboratorios(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoImpuestos": form = new FrmImpuestos(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoSustancias": form = new FrmSustancias(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoEstaciones": form = new FrmEstaciones(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoClavesSat": Ambiente.Mensaje(Ambiente.CatalgoMensajes[-5]); break; case "NodoPresentaciones": form = new FrmPresentaciones(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoUnidadesMedida": form = new FrmUnidadMedida(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoUsuarios": form = new FrmUsuarios(); form.MdiParent = Mdi.MdiParent; form.Show(); break; //CONCEPTOS case "NodoConEgre": form = new FrmConceptosEgreso(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoConIngre": form = new FrmConceptosIngreso(); form.MdiParent = Mdi.MdiParent; form.Show(); break; case "NodoConMovsInv": form = new FrmConceptosMovsInv(); form.MdiParent = Mdi.MdiParent; form.Show(); break; default: Ambiente.Mensaje("No se encontrĂ³ Forma Update"); return; } }