From e20a61256fe6233f5d7303d8e6b1a952c8c46354 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 9 Feb 2022 07:32:02 -0700 Subject: [PATCH] --- App_Code/ClsVentas.vb | 19 +++++++ Compras/PopUpVerFactura.aspx.vb | 39 ++++++++++++-- GPS/PalletEtiquetaCaja.rdlc | 77 +++++++++++++++++++-------- RH/RepPersonalInconsistencias.aspx.vb | 23 ++++---- packages.config | 2 + 5 files changed, 121 insertions(+), 39 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 2daceca7c..1a039efa3 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -162,6 +162,25 @@ Public Class ClsVentas Return Retorno End Function + + Public Function Embarque_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_AGRO_Embarque_ManifiestoUpvta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = cveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@cveEmbarqueManifiesto", SqlDbType.Int).Value = cveEmbarqueManifiesto + .Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetTerminal") diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 11c6901a0..b95849eda 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -261,8 +261,8 @@ Partial Class PopUpVerFactura Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio")) Rem1Placa = row("Rem1Placa").ToString() NoFactura = row("NoFactura").ToString() - Remolque1 = String.Format("{0} ", row("Rem1Especificacion"), row("Rem1Anio")) - Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional") + Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio")) + Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional") NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString()) @@ -394,11 +394,12 @@ Partial Class PopUpVerFactura NoCajas = row("NoCajas").ToString() Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper() CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero() - NumberOfCode = String.Format("(01)00856977005186(13){0:ddMMyy}(10){0}01", Regex.Match(row("Cuadro").ToString(), "\\d+"), row("Fecha")) + NumberOfCode = String.Format("(01)00856977005186(13){1:ddMMyy}(10){0}01", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha")) End If End Using Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("Tamano", Tamano)) params.Add(New ReportParameter("noPallet", noPallet)) params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion)) @@ -410,16 +411,44 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo))) params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase))) + + Dim tablaReporte As New DataTable - - tablaReporte.Columns.Add(New DataColumn("Codigo", GetType(String))) tablaReporte.Rows.Add(tablaReporte.NewRow) tablaReporte.Rows.Add(tablaReporte.NewRow) Dim lrds As New List(Of ReportDataSource) + + 'img + Dim dtqr As New DataTable + Dim column As DataColumn = New DataColumn("ImagenByte") + column.DataType = System.Type.[GetType]("System.Byte[]") + column.AllowDBNull = True + column.Caption = "ImagenByte" + dtqr.Columns.Add(column) + Dim rowqr As DataRow = dtqr.NewRow() + + + Dim bcode As New BarcodeLib.Barcode() + Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 50, 10) + Dim barcodebyte As Byte() + Using ms = New MemoryStream() + img.Save(ms, System.Drawing.Imaging.ImageFormat.Png) + barcodebyte = ms.ToArray() + End Using + rowqr("ImagenByte") = barcodebyte + + dtqr.Rows.Add(rowqr) + Dim rds2 As New ReportDataSource With {.Name = "dsImagenes", .Value = dtqr} + rds2.Name = "dsImagenes" + rds2.Value = dtqr + lrds.Add(rds2) + 'endimg + Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte} lrds.Add(rds) + '"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" Dim ruta As String = "GPS/PalletEtiquetaCaja.rdlc" diff --git a/GPS/PalletEtiquetaCaja.rdlc b/GPS/PalletEtiquetaCaja.rdlc index 113da5366..50449af53 100644 --- a/GPS/PalletEtiquetaCaja.rdlc +++ b/GPS/PalletEtiquetaCaja.rdlc @@ -2,6 +2,13 @@ 0 + + + System.Data.DataSet + /* Local Connection */ + + 06ae5329-8ff5-42b5-b7f4-6d68e5186421 + System.Data.DataSet @@ -11,6 +18,26 @@ + + + dsImagenes + /* Local Query */ + + + + ImagenByte + System.Byte[] + + + + dsImagenes + C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd + dtImagenes + + + + + DataSet @@ -72,7 +99,7 @@ - 0.6cm + 0.2825cm @@ -667,7 +694,7 @@ KM12 HERMOSILLO, SONORA - 0.52062cm + 0.4677cm @@ -856,7 +883,7 @@ KM12 HERMOSILLO, SONORA - 0.52062cm + 0.4677cm @@ -953,7 +980,7 @@ KM12 HERMOSILLO, SONORA - 0.54708cm + 0.4677cm @@ -1036,7 +1063,7 @@ KM12 HERMOSILLO, SONORA - 0.6cm + 0.46771cm @@ -1197,7 +1224,7 @@ KM12 HERMOSILLO, SONORA - 0.6cm + 0.46771cm @@ -1392,7 +1419,7 @@ KM12 HERMOSILLO, SONORA - 0.41479cm + 0.3258cm @@ -1475,7 +1502,7 @@ KM12 HERMOSILLO, SONORA - 0.09729cm + 0.07938cm @@ -1820,7 +1847,7 @@ KM12 HERMOSILLO, SONORA - 0.49417cm + 0.38834cm @@ -1963,7 +1990,7 @@ KM12 HERMOSILLO, SONORA - 0.46771cm + 0.36188cm @@ -2168,7 +2195,7 @@ KM12 HERMOSILLO, SONORA - 0.46771cm + 0.41479cm @@ -2315,7 +2342,7 @@ KM12 HERMOSILLO, SONORA - 0.6cm + 0.52062cm @@ -2456,13 +2483,14 @@ KM12 HERMOSILLO, SONORA - 1.18209cm + 0.99688cm - - Embedded - CodBarr + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png FitProportional 5 + true @@ -2499,7 +2529,7 @@ KM12 HERMOSILLO, SONORA - 0.49417cm + 0.36188cm @@ -2580,7 +2610,7 @@ KM12 HERMOSILLO, SONORA - 1.12917cm + 1.0498cm @@ -2981,9 +3011,10 @@ Produce of MX. + DataSet1 0.07228cm 0.05625cm - 10.19917cm + 8.58414cm 10.52136cm - 4.23096in + 3.53304in