private void menuItem2_Click(object sender, EventArgs e)
 {
     try
     {
         obtenMacAdress();
         int res = ws.insertEtiquetas(lblPedido.Text, lblOrdProd.Text, lblCliente.Text, lblTarima.Text, folio[4], int.Parse(lblCantidad.Text), ct, lblMedida.Text, lblCodigo.Text, lblColor.Text, lbTipo.Text, tag);
         if (res == 0)
         {
             printLabel(zpl);
             //LiberarControles(this);
             this.Dispose();
             GC.Collect();
             MessageBox.Show("Impresion de Etiqueta:\nExitosa");
             frmMenu_Principal fmp = new frmMenu_Principal(user);
             fmp.Show();
         }
         else
         {
             MessageBox.Show("Hubo un problema con la impresion\n Por favor intente de nuevo");
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message);
         MessageBox.Show("Hubo un problema con la impresora\n Por favor intente de nuevo");
     }
 }
 public void finalizarEscuadra()
 {
     Cursor.Current = Cursors.WaitCursor;
     if (result.Contains("Asignada"))
     {
         //string res = met.avanzarEstado(folios[1], folios[10], folios[0], folios[11], int.Parse(folios[16]), user[4], newId);
         //if (res.Contains("Exitoso"))
         //{
         //ws.insertMovinEntrada(2, folios[1], int.Parse(folios[2]), 0, epece, folios[8], int.Parse(txtPXT.Text), "APT-BUS");
         MessageBox.Show("Escuadra Asignada Exitosamente", "Exito");
         GC.Collect();
         frmMenu_Principal fmp = new frmMenu_Principal(user);
         fmp.Show();
         //LiberarControles(this);
         this.Dispose();
         dataGrid1.Dispose();
         //}
         //else
         //{
         //    Cursor.Current = Cursors.Default;
         //    MessageBox.Show(res, "Advertencia");
         //}
     }
     else
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(result, "Advertencia");
     }
 }
Пример #3
0
 private void menuItem2_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         bool res = ws.asignaEscuadraVirtual(lblCodigo.Text, int.Parse(lblResistencia.Text));
         if (res)
         {
             this.Dispose();
             GC.Collect();
             MessageBox.Show("Proceso Exitoso");
             Cursor.Current = Cursors.Default;
             frmMenu_Principal fmp = new frmMenu_Principal(user);
             fmp.Show();
         }
         else
         {
             Cursor.Current = Cursors.Default;
             MessageBox.Show("Hubo un problema con la asignación\n Por favor intente de nuevo");
         }
     }
     catch (Exception ee)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(ee.Message);
         MessageBox.Show("Hubo un problema con la asignación\n Por favor intente de nuevo");
     }
 }
        private void menuItem1_Click(object sender, EventArgs e)
        {
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
            this.Dispose();
        }
        private void menuItem2_Click(object sender, EventArgs e)
        {
            if (dataGrid1.VisibleRowCount > 0)
            {
                DialogResult dr = MessageBox.Show("¿Seguro que desea salir?", "Aviso", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                if (dr == DialogResult.Yes)
                {
                    //c.finalizaInventario(idInv);//MODIFICAR PARA FINALIZAR EL INVENTARIO

                    Cursor.Current = Cursors.WaitCursor;
                    frmMenu_Principal fmp = new frmMenu_Principal(user);
                    fmp.Show();
                    this.Dispose();
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                }
            }
            else
            {
                Cursor.Current = Cursors.WaitCursor;
                frmMenu_Almacen fma = new frmMenu_Almacen(user);
                fma.Show();
                this.Dispose();
                Cursor.Current = Cursors.Default;
            }
        }
        private void btnFinalizar_Click(object sender, EventArgs e)
        {
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
            this.Dispose();
            dataGrid1.Dispose();
        }
        private void Asignar_Escuadra_Closing(object sender, CancelEventArgs e)
        {
            //LiberarControles(this);
            this.Dispose();
            GC.Collect();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
            dataGrid1.Dispose();
        }
        private void menuItem1_Click(object sender, EventArgs e)
        {
            //LiberarControles(this);
            this.Dispose();
            GC.Collect();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
            dataGrid1.Dispose();
        }
        private void menuItem2_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.Default;
            int current = 1;
            try
            {
                conectarAccion();
                obtenMacAdress();
                DataTable colaImpresion = ws.cargarColaImpresion(lblPedido.Text, lblOrdProd.Text, EPC);

                foreach (DataRow impresion in colaImpresion.Rows)
                {
                    lblTarima.Text = current.ToString() + " de " + total;
                    //cálculo de piezas por tarima
                    lblCantidad.Text = impresion["CantidadTarima"].ToString();
                    actualizarZpl();
                    printLabel(zpl);
                    current++;
                }
                
              
               
                
                //LiberarControles(this);
                this.Dispose();
                GC.Collect();
                MessageBox.Show("Impresión de Etiquetas:\nExitosa");
     
                Cursor.Current = Cursors.Default;
                frmMenu_Principal fmp = new frmMenu_Principal(user);
                fmp.Show();
            
            }
            catch (Exception ee)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ee.Message);
                MessageBox.Show("Hubo un problema con la impresora\n Por favor intente de nuevo");
            }
        }
        private void menuItem1_Click(object sender, EventArgs e)//REGRESA AL MENU PRINCIPAL
        {
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
        }