コード例 #1
0
 public static FrmProveedores Instance()
 {
     if (((frmInstance == null) ||
          (frmInstance.IsDisposed == true)))
     {
         frmInstance = new FrmProveedores();
     }
     frmInstance.BringToFront();
     return(frmInstance);
 }
コード例 #2
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            if (per == "2" || per == "3")
            {
                MessageBox.Show("Uste no tiene permiso para acceder a este Mantenimiento.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            FrmProveedores llamar = null;

            llamar           = FrmProveedores.Instance();
            llamar.MdiParent = this;
            llamar.Show();
        }
コード例 #3
0
        private void MenuItemOnClick(object sender, EventArgs e)
        {
            // Referenciamos el control que ha desencadenado el evento
            ToolStripMenuItem item = (ToolStripMenuItem)sender;

            if (item.ToString() == "Clientes")
            {
                FrmClientes llamar = null;

                llamar           = FrmClientes.Instance();
                llamar.MdiParent = this;
                llamar.Show();
            }
            else if (item.ToString() == "Proveedores")
            {
                FrmProveedores llamar = null;

                llamar           = FrmProveedores.Instance();
                llamar.MdiParent = this;
                llamar.Show();
            }
            else if (item.ToString() == "Usuario")
            {
                FrmUsuario llamar = null;

                llamar           = FrmUsuario.Instance();
                llamar.MdiParent = this;
                llamar.Show();
            }
            else if (item.ToString() == "Reportes Clientes")
            {
                FrmReporteCliente rep = new FrmReporteCliente();
                rep.ShowDialog();
            }
            else if (item.ToString() == "Reportes de Ventas")
            {
                FrmReporteFactura rep = new FrmReporteFactura();
                rep.ShowDialog();
            }
            else if (item.ToString() == "Reportes Productos")
            {
                FrmReporteProducto rep = new FrmReporteProducto();
                rep.ShowDialog();
            }
            else if (item.ToString() == "Reportes Usuario")
            {
                FrmReporteUsuario rep = new FrmReporteUsuario();
                rep.ShowDialog();
            }
            else if (item.ToString() == "Productos")
            {
                FrmProductos llamar = null;

                llamar           = FrmProductos.Instance();
                llamar.MdiParent = this;
                llamar.Show();
            }
            else if (item.ToString() == "Facturar")
            {
                FrmFacturar llamar = null;
                string      u      = toolStripStatusLabel1.Text;
                llamar           = FrmFacturar.Instance();
                llamar           = new FrmFacturar(u);
                llamar.MdiParent = this;
                llamar.Show();
            }
            else if (item.ToString() == "Inventario ")
            {
                FrmInventario llamar = null;

                llamar           = FrmInventario.Instance();
                llamar           = new FrmInventario(usu);
                llamar.MdiParent = this;
                llamar.Show();
            }
            else if (item.ToString() == "Ayuda")
            {
                BtnAyuda.PerformClick();
            }
            else if (item.ToString() == "Salir")
            {
                toolStripButton4.PerformClick();
            }
        }