private void btnInventario_Click(object sender, EventArgs e)
 {
     if (this.inventario == null)
     {
         this.inventario = new inventarioBase(this)
         {
             MdiParent = this
         };
         this.inventario.Show();
     }
     else if (this.inventario.WindowState == FormWindowState.Normal)
     {
         this.inventario.WindowState = FormWindowState.Minimized;
     }
     else
     {
         this.inventario.WindowState = FormWindowState.Normal;
     }
 }
Ejemplo n.º 2
0
        public altaproducto(inventarioBase invbase)
        {
            InitializeComponent();
            this.FormClosed += (sender, args) => { invbase.Close(); };
            this.centercruds();
            this.nupd1.Maximum = 500000;
            this.nupd1.Minimum = 1;

            this.Resize += (sender, args) => {
                this.centercruds();
            };

            behaviorDefinitions.txtOnlyNumbers(ref this.txtcodigo);

            this.txtcodigo.KeyPress += (sender, args) => {
                if (args.KeyChar == (char)Keys.Enter)
                {
                    this.txtcodigoenter();
                }
            };

            this.db = new dbop();

            this.btnagregar.Click += (sender, args) => { this.agregar(); };

            this.nupd1.KeyPress += (sender, args) =>
            {
                if (args.KeyChar == (char)Keys.Enter)
                {
                    this.agregar();
                }
            };

            this.btnagregar.GotFocus += (sender, args) => { this.nupd1.Focus(); };

            this.btnreload.Visible = false;

            this.nupd1.GotFocus += (sender, args) => { this.nupd1.Select(0, 0); };
        }
 public seeproductsinternal(inventarioBase IB)
 {
     InitializeComponent();
     this.initialconfigs();
     this.FormClosed += (sender, args) => { IB.Close(); };
 }
Ejemplo n.º 4
0
 public bajaproducto(inventarioBase IB) : base(IB)
 {
     InitializeComponent();
     this.Size            = base.Size;
     this.btnagregar.Text = "Remover de Inventario";
 }