This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-04-19 09:14:06 -07:00
parent eed61d90f7
commit cbc3a6336a
15 changed files with 4092 additions and 2464 deletions

View File

@@ -6013,16 +6013,21 @@ Public Class ClsPaginas
Dim wsreport As New WSRDLC.WebServiceSoapClient
Dim params As New List(Of WSRDLC.ReportParameter)
Dim reportobjects As New List(Of WSRDLC.ReportObjects)
Dim ds As New DataSet
For Each rpds As ReportDataSource In DataSource
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
If dt Is Nothing Then
dt = New DataTable()
Else
If rpds.Value.GetType().ToString() = "System.Data.DataTable" Then
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
dt = dt.Copy()
dt.TableName = rpds.Name
ds.Tables.Add(dt)
Else
Dim ojext As New WSRDLC.ReportObjects
ojext.Name = rpds.Name
ojext.Value = rpds.Value
reportobjects.Add(ojext)
End If
dt.TableName = rpds.Name
ds.Tables.Add(dt)
Next
For Each rpds As ReportParameter In Parametros
Dim param As New WSRDLC.ReportParameter
@@ -6030,7 +6035,7 @@ Public Class ClsPaginas
param.Values = {rpds.Values(0)}
params.Add(param)
Next
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
Bytes = wsreport.StreamNEWPDFBytes(RutaReporte, ds, reportobjects.ToArray(), params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
wsreport = Nothing
params = Nothing
ds.Dispose() : ds = Nothing

Binary file not shown.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="3482481b-8443-4407-93cb-d3e86f1a86f2" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ReferenceGroup xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="3482481b-8443-4407-93cb-d3e86f1a86f2" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ClientOptions>
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
<GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>
@@ -22,8 +22,8 @@
<MetadataSource Address="http://localhost:7999/WebService.asmx" Protocol="http" SourceId="1" />
</MetadataSources>
<Metadata>
<MetadataFile FileName="WebService.disco" MetadataType="Disco" ID="88f9f2ea-e38b-4dfa-968b-c305ff10e146" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?disco" />
<MetadataFile FileName="WebService.wsdl" MetadataType="Wsdl" ID="21ef4883-f54f-47da-857a-18c67053b062" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?wsdl" />
<MetadataFile FileName="WebService.disco" MetadataType="Disco" ID="88f9f2ea-e38b-4dfa-968b-c305ff10e146" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?disco" />
</Metadata>
<Extensions>
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost:7999/WebService.asmx?wsdl" docRef="http://localhost:7999/WebService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="http://localhost:7999/WebService.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="http://localhost:7999/WebService.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://tempuri.org/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="HelloWorld">
@@ -83,6 +83,73 @@
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDF">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="reportobjects" type="tns:ArrayOfReportObjects" />
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfReportObjects">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="ReportObjects" nillable="true" type="tns:ReportObjects" />
</s:sequence>
</s:complexType>
<s:complexType name="ReportObjects">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Value" />
</s:sequence>
</s:complexType>
<s:element name="StreamNEWPDFResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamNEWPDFResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDFBytes">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="reportobjects" type="tns:ArrayOfReportObjects" />
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDFBytesResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamNEWPDFBytesResult" type="s:base64Binary" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
@@ -103,6 +170,18 @@
<wsdl:message name="StreamPDFBytesSoapOut">
<wsdl:part name="parameters" element="tns:StreamPDFBytesResponse" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFSoapIn">
<wsdl:part name="parameters" element="tns:StreamNEWPDF" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFSoapOut">
<wsdl:part name="parameters" element="tns:StreamNEWPDFResponse" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFBytesSoapIn">
<wsdl:part name="parameters" element="tns:StreamNEWPDFBytes" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFBytesSoapOut">
<wsdl:part name="parameters" element="tns:StreamNEWPDFBytesResponse" />
</wsdl:message>
<wsdl:portType name="WebServiceSoap">
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
@@ -116,6 +195,14 @@
<wsdl:input message="tns:StreamPDFBytesSoapIn" />
<wsdl:output message="tns:StreamPDFBytesSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<wsdl:input message="tns:StreamNEWPDFSoapIn" />
<wsdl:output message="tns:StreamNEWPDFSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<wsdl:input message="tns:StreamNEWPDFBytesSoapIn" />
<wsdl:output message="tns:StreamNEWPDFBytesSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceSoap" type="tns:WebServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -146,6 +233,24 @@
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<soap:operation soapAction="http://tempuri.org/StreamNEWPDF" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<soap:operation soapAction="http://tempuri.org/StreamNEWPDFBytes" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WebServiceSoap12" type="tns:WebServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -176,6 +281,24 @@
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<soap12:operation soapAction="http://tempuri.org/StreamNEWPDF" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<soap12:operation soapAction="http://tempuri.org/StreamNEWPDFBytes" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WebService">
<wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
<configurationSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
<behaviors />
<bindings>
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;WebServiceSoap&quot; /&gt;" bindingType="basicHttpBinding" name="WebServiceSoap" />
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;WebServiceSoap1&quot; /&gt;" bindingType="basicHttpBinding" name="WebServiceSoap1" />
</bindings>
<endpoints>
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap&quot; /&gt;" contractName="WSRDLC.WebServiceSoap" name="WebServiceSoap" />
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap1&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap1&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap1&quot; contract=&quot;WSRDLC.WebServiceSoap&quot; name=&quot;WebServiceSoap1&quot; /&gt;" contractName="WSRDLC.WebServiceSoap" name="WebServiceSoap1" />
</endpoints>
</configurationSnapshot>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="J3l8dfyTP2yXDg07woasSqmbZaw=">
<SavedWcfConfigurationInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="9.1" CheckSum="Ejgt26VwGnP0vzQRnoYFm96JNl+mnc4I7Uy+Cy9lVNQ=">
<bindingConfigurations>
<bindingConfiguration bindingType="basicHttpBinding" name="WebServiceSoap">
<bindingConfiguration bindingType="basicHttpBinding" name="WebServiceSoap1">
<properties>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap</serializedValue>
<serializedValue>WebServiceSoap1</serializedValue>
</property>
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
@@ -112,7 +112,7 @@
</bindingConfiguration>
</bindingConfigurations>
<endpoints>
<endpoint name="WebServiceSoap" contract="WSRDLC.WebServiceSoap" bindingType="basicHttpBinding" address="http://localhost:7999/WebService.asmx" bindingConfiguration="WebServiceSoap">
<endpoint name="WebServiceSoap1" contract="WSRDLC.WebServiceSoap" bindingType="basicHttpBinding" address="http://localhost:7999/WebService.asmx" bindingConfiguration="WebServiceSoap1">
<properties>
<property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>http://localhost:7999/WebService.asmx</serializedValue>
@@ -124,7 +124,7 @@
<serializedValue>basicHttpBinding</serializedValue>
</property>
<property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap</serializedValue>
<serializedValue>WebServiceSoap1</serializedValue>
</property>
<property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WSRDLC.WebServiceSoap</serializedValue>
@@ -187,7 +187,7 @@
<serializedValue>False</serializedValue>
</property>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap</serializedValue>
<serializedValue>WebServiceSoap1</serializedValue>
</property>
<property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />

View File

@@ -360,10 +360,37 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Cultivo", Cultivo))
params.Add(New ReportParameter("noPallet", noPallet))
params.Add(New ReportParameter("Variedad", Variedad))
Dim tablaReporte As New DataTable
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), 500, 100)
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
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Pallet")
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", lrds, params, "Pallet")
End Sub
Private Sub imprimirpallet(cvePallet As Integer)
Dim Envase As String = ""
@@ -377,6 +404,8 @@ Partial Class PopUpVerFactura
Dim NoCajas As String = ""
Dim NumberOfCode As String = ""
Dim CvetypeImpresion As Integer
Dim NumberSmall As String = ""
Dim NumberBig As String = ""
'Envase = "1 1/9"
'Tamano = "Small"
'Cultivo = "Tomate"
@@ -394,8 +423,9 @@ 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){1:ddMMyy}(10){0}01", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
NumberOfCode = String.Format("(00)00000000000000(00){1:ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
NumberSmall = String.Format("{0:00}", noPallet.ToEntero())
NumberBig = String.Format("{0:00}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha"))
End If
End Using
Dim params As New List(Of ReportParameter)
@@ -405,11 +435,13 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion))
params.Add(New ReportParameter("Consecutivo", Consecutivo))
params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("CveFormato", If(Cultivo.ToLower() = "tomate", "3", CvetypeImpresion.ToString())))
params.Add(New ReportParameter("CveFormato", If(Cultivo.ToLower().Contains("tomate"), "3", CvetypeImpresion.ToString())))
params.Add(New ReportParameter("NoCajas", NoCajas))
params.Add(New ReportParameter("NumberOfCode", NumberOfCode))
params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo)))
params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase)))
params.Add(New ReportParameter("NumberSmall", NumberSmall))
params.Add(New ReportParameter("NumberBig", NumberBig))
@@ -431,10 +463,10 @@ Partial Class PopUpVerFactura
Dim bcode As New BarcodeLib.Barcode()
' Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
Dim barcodebyte As Byte()
Using ms = New MemoryStream()
' img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
barcodebyte = ms.ToArray()
End Using
rowqr("ImagenByte") = barcodebyte
@@ -807,15 +839,15 @@ Partial Class PopUpVerFactura
DtCortesVentasResumen = ObjVenta.DtResultados
End If
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
DtCortesVentas = ObjPuntoVenta.DtResultados
If DtCortesVentas.Rows.Count > 0 Then
Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
' DtCortesVentas = ObjPuntoVenta.DtResultados
' If DtCortesVentas.Rows.Count > 0 Then
' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
Fecha = RowInfo("FechaInicial").ToString
Nombre = RowInfo("Nombre").ToString
End If
End If
' Fecha = RowInfo("FechaInicial").ToString
' Nombre = RowInfo("Nombre").ToString
' End If
'End If
ObjVenta.Dispose()
ObjPuntoVenta.Dispose()
Dim FechaCorte As String = $"&emsp;<b>Fecha fin:</b> {Fecha}"

File diff suppressed because it is too large Load Diff

View File

@@ -3204,7 +3204,7 @@ Produce of MX.</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>63</Value>
<Value>=Parameters!NumberSmall.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
@@ -3240,7 +3240,7 @@ Produce of MX.</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>47</Value>
<Value>=Parameters!NumberBig.Value</Value>
<Style>
<FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -3382,7 +3382,7 @@ Produce of MX.</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>63</Value>
<Value>=Parameters!NumberSmall.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
@@ -3418,7 +3418,7 @@ Produce of MX.</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>47</Value>
<Value>=Parameters!NumberBig.Value</Value>
<Style>
<FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -3444,6 +3444,7 @@ Produce of MX.</Value>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
@@ -3921,7 +3922,7 @@ Produce of MX.</Value>
<Top>0.0801cm</Top>
<Left>0.05458cm</Left>
<Height>8.07288cm</Height>
<Width>10.64012cm</Width>
<Width>10.6401cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -4005,6 +4006,18 @@ Produce of MX.</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NumberSmall">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NumberBig">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="logojam">

View File

@@ -132,13 +132,13 @@
<%--<script type="text/javascript" src="/Scripts/Notificaciones.js"></script>--%>
<script>
function opennewlocation(returnurl, token) {
debugger;
// debugger;
if (token.length > 0) {
$('#framexd').attr('src', token)
} else {
}
setTimeout(function () { document.location = returnurl; }, 2000);
setTimeout(function () { document.location = returnurl; }, 1000);
}
// aqui debe de llammarse siganalr, para desconectar
function exitsignalr() {

View File

@@ -278,7 +278,7 @@ Partial Class LogIn
strdomain = strdomain.Replace(String.Format(":{0}", Request.Url.Port), "")
End If
Dim token As String = GetTokenAngular()
routeangular = String.Format("{0}{1}/auth/login?token={3}{4}&returnUrl=/{2}", strdomain, puerto, HttpUtility.UrlEncode(ReturnUrl), HttpUtility.UrlEncode(token), If(puerto.Length > 0, "cerrar=1&", ""))
routeangular = String.Format("{0}{1}/auth/login?token={3}{4}&returnUrl=/{2}", strdomain, puerto, HttpUtility.UrlEncode(ReturnUrl), HttpUtility.UrlEncode(token), If(puerto.Length > 0, "", "")) '&cerrar=1
'S ies angular retiro el https para que no marque error la pagina
routeangular = routeangular.Replace("https", "http")
routeangular = routeangular.Replace("HTTPS", "HTTP")

40
SiteAngular.aspx Normal file
View File

@@ -0,0 +1,40 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SiteAngular.aspx.cs" Inherits="SiteAngular" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="FromSIG" runat="server">
<div>
</div>
<script type="text/javascript">
let currentoring = document.location.origin;
window.addEventListener('message', function (event) {
if (event.origin != currentoring) {
if (event.data) {
localStorage.setItem("localstorage", event.data);
} else {
localStorage.removeItem("localstorage");
}
console.log("hola SIG")
var postMsg = { 'msg': 'TokenSig', 'data': 'datos', 'token': '<%= GetTokenAngular() %>' };
parent.postMessage(postMsg, event.origin);
}
});
function loadpage() {
var postMsg = { 'msg': 'TokenSig', 'data': 'datos', 'token': '<%= GetTokenAngular() %>' };
parent.postMessage(postMsg, event.origin);
} loadpage();
console.log("hola SIG load");
</script>
</form>
</body>
</html>

53
SiteAngular.aspx.cs Normal file
View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class SiteAngular : System.Web.UI.Page
{
public Usuario UsuarioActual
{
get
{
try
{
// UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario)
if (Context.Session["UsuarioSIG"] == null)
{
return null;
}
else {
return (Usuario)Context.Session["UsuarioSIG"];
}
}
catch (Exception ex)
{
return null;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
public string GetTokenAngular()
{
if (Context.Session["UsuarioSIG"] != null)
{
Usuario usuario = (Usuario)Context.Session["UsuarioSIG"];
var tokenDescriptor = new Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor() { Subject = new System.Security.Claims.ClaimsIdentity(new System.Security.Claims.Claim[] { new System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()), new System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), new System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()), new System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), new System.Security.Claims.Claim("Fecha", DateTime.Now.ToLongDateString()) }), Expires = DateTime.UtcNow.AddHours(3), SigningCredentials = new Microsoft.IdentityModel.Tokens.SigningCredentials(new Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")), Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature) };
var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler();
var newtoken = tokenHandler.CreateToken(tokenDescriptor);
string stokenn = tokenHandler.WriteToken(newtoken);
return stokenn;
}
else
return "";
}
}

View File

@@ -466,6 +466,10 @@