Example #1
0
        private bool ImprimeEtiqueta(string _asRecibo, int _aiConsec)
        {
            this.Cursor = Cursors.WaitCursor;
            bool bPrint = false;

            try
            {
                ReciboLogica rec = new ReciboLogica();
                rec.Recibo = _asRecibo;
                rec.Consec = _aiConsec;

                DataTable datos = ReciboLogica.ConsultaReciboMov(rec);
                if (datos.Rows.Count > 0)
                {
                    string sFecha    = datos.Rows[0]["f_carga"].ToString();
                    string sOrden    = datos.Rows[0]["orden"].ToString();
                    string sArticulo = datos.Rows[0]["no_art"].ToString();
                    string sDescrip  = datos.Rows[0]["desc_art"].ToString();
                    double dCant     = Double.Parse(datos.Rows[0]["cantidad"].ToString());
                    string sUM       = datos.Rows[0]["um"].ToString();
                    string sUsuario  = datos.Rows[0]["recibio"].ToString();

                    bPrint = GeneraEtiqueta(_asRecibo, sOrden, sFecha, sArticulo, sDescrip, dCant, sUM, sUsuario);
                }
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Arrow;
                MessageBox.Show(ex.ToString(), Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                bPrint = false;
                Close();
            }

            this.Cursor = Cursors.Arrow;
            return(bPrint);
        }