Ejemplo n.º 1
0
        private string CrearImagenCB(int NroBulto)
        {
            // Creo las imagenes del código de barras para luego utilizarla en el control de impresión
            string nroGuiaCB = Utiles.Formatos.Tipo2Numero(tipoGuia) + nroSucursal + nroGuia.ToString("000000") + NroBulto.ToString("000");

            System.Drawing.Image myimg  = Code128Rendering.MakeBarcodeImage(nroGuiaCB, 1, true, 14);
            System.Drawing.Image myimg2 = Code128Rendering.MakeBarcodeImageHoriz(nroGuiaCB, 1, true);
            string nombreArchivo        = nroGuiaCB + ".jpg";
            string ruta = Server.MapPath("CB") + "\\";

            myimg.Save(ruta + nombreArchivo, System.Drawing.Imaging.ImageFormat.Jpeg);
            myimg2.Save(ruta + "NAC" + nombreArchivo, System.Drawing.Imaging.ImageFormat.Jpeg);
            return(nombreArchivo);
        }