This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-04-27 22:09:42 -07:00
parent 5b3682c133
commit 3c29967cab
8 changed files with 2818 additions and 180 deletions

View File

@@ -6356,16 +6356,34 @@ Public Class ClsPaginas
Try Try
bytes = bytes bytes = bytes
'Response.Clear()
'Response.ContentType = "application/pdf"
'Response.Cache.SetCacheability(HttpCacheability.Private)
'Response.Expires = -1
'Response.Buffer = True
''Uncomment to handle the file as attachment
'Response.AddHeader("Content-Disposition", String.Format("inline; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
''Response.BinaryWrite(bytes)
'bytes = Nothing
'Response.End()
Response.Buffer = True Response.Buffer = True
Response.Clear() Response.Clear()
Response.ContentType = mimeType If Formato = "PDF" Then
Response.ContentType = "application/pdf"
Else
Response.ContentType = mimeType
End If
Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
Response.BinaryWrite(bytes) ' create the file Response.BinaryWrite(bytes) ' create the file
Response.Flush() ' send it to the client to download Response.Flush() ' send it to the client to download
HttpContext.Current.Response.SuppressContent = True HttpContext.Current.Response.SuppressContent = True
HttpContext.Current.ApplicationInstance.CompleteRequest() HttpContext.Current.ApplicationInstance.CompleteRequest()
HttpContext.Current.Response.End()
bytes = Nothing bytes = Nothing
'HttpContext.Current.Response.End()
Catch ex As Exception Catch ex As Exception
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then

View File

@@ -212,11 +212,15 @@ Partial Class PopUpVerFactura
If Request("onlyPrint").ToString() = "manifiestoRemision" Then If Request("onlyPrint").ToString() = "manifiestoRemision" Then
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero()) imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If End If
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" Then
imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
End If End If
End If End If
End Sub End Sub
Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer) Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer)
Dim NoEmbarque As String = "" Dim NoEmbarque As String = ""
Dim Fecha As String = "" Dim Fecha As String = ""
@@ -235,6 +239,8 @@ Partial Class PopUpVerFactura
Dim NoKgManifiesto As String = "" Dim NoKgManifiesto As String = ""
Dim Mercado As String = "" Dim Mercado As String = ""
Dim NoFactura As String = "" Dim NoFactura As String = ""
Dim Cliente As String = ""
Dim Direccion As String = ""
Dim LongitudCaja As String = "" Dim LongitudCaja As String = ""
Dim LineaTransportacion As String = "" Dim LineaTransportacion As String = ""
@@ -254,6 +260,8 @@ Partial Class PopUpVerFactura
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0) Dim row As DataRow = objnom.DtResultados.Rows(0)
NoEmbarque = row("NoEmbarque").ToString() NoEmbarque = row("NoEmbarque").ToString()
Cliente = row("Cliente").ToString()
Direccion = row("Direccion").ToString()
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha")) Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
SubProyecto = row("SubProyecto").ToString() SubProyecto = row("SubProyecto").ToString()
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString() AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
@@ -288,6 +296,7 @@ Partial Class PopUpVerFactura
NoPallets = objnom.DtResultados.Rows.Count.ToString() NoPallets = objnom.DtResultados.Rows.Count.ToString()
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2") NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0") NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
tablaReporte = objnom.DtResultados tablaReporte = objnom.DtResultados
End If End If
End If End If
@@ -295,6 +304,8 @@ Partial Class PopUpVerFactura
End Using End Using
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NoEmbarque", NoEmbarque)) params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
params.Add(New ReportParameter("Cliente", Cliente))
params.Add(New ReportParameter("Direccion", Direccion))
params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("SubProyecto", SubProyecto)) params.Add(New ReportParameter("SubProyecto", SubProyecto))
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA)) params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
@@ -335,8 +346,7 @@ Partial Class PopUpVerFactura
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto") ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto")
End Sub End Sub
Private Sub imprimirManifiestoRemision(cveEmbarqueManifiesto As Integer)
Private Sub imprimirManifiestoRemisionRemision(cveEmbarqueManifiesto As Integer)
Dim NoEmbarque As String = "" Dim NoEmbarque As String = ""
Dim Fecha As String = "" Dim Fecha As String = ""
Dim SubProyecto As String = "" Dim SubProyecto As String = ""
@@ -361,6 +371,8 @@ Partial Class PopUpVerFactura
Dim RPC As String = "" Dim RPC As String = ""
Dim BINSDECARTON As String = "" Dim BINSDECARTON As String = ""
Dim TotalDlls As String = "" Dim TotalDlls As String = ""
Dim Cliente As String = ""
Dim Direccion As String = ""
@@ -382,6 +394,8 @@ Partial Class PopUpVerFactura
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0) Dim row As DataRow = objnom.DtResultados.Rows(0)
NoEmbarque = row("NoEmbarque").ToString() NoEmbarque = row("NoEmbarque").ToString()
Cliente = row("Cliente").ToString()
Direccion = row("Direccion").ToString()
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha")) Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton")) DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico")) BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
@@ -389,6 +403,7 @@ Partial Class PopUpVerFactura
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON")) CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
RPC = String.Format("{0:N0}", row("RPC")) RPC = String.Format("{0:N0}", row("RPC"))
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON")) BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
@@ -402,7 +417,7 @@ Partial Class PopUpVerFactura
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio")) Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
Rem1Placa = row("Rem1Placa").ToString() Rem1Placa = row("Rem1Placa").ToString()
NoFactura = row("NoFactura").ToString() NoFactura = row("NoFactura").ToString()
Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio")) Remolque1 = String.Format("{0} ", row("NumeroTrailer"))
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional") Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString()) NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
@@ -432,6 +447,8 @@ Partial Class PopUpVerFactura
End Using End Using
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NoEmbarque", NoEmbarque)) params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
params.Add(New ReportParameter("Cliente", Cliente))
params.Add(New ReportParameter("Direccion", Direccion))
params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("SubProyecto", SubProyecto)) params.Add(New ReportParameter("SubProyecto", SubProyecto))
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA)) params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
@@ -476,8 +493,178 @@ Partial Class PopUpVerFactura
lrds.Add(rds) lrds.Add(rds)
'"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Manifesto") ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión")
End Sub End Sub
Private Sub imprimirManifiestoCartaPorte(cveEmbarqueManifiesto As Integer)
Dim NoEmbarque As String = ""
Dim Fecha As String = ""
Dim SubProyecto As String = ""
Dim AgenciaAduanalUSA As String = ""
Dim AgenciaAduanalMEX As String = ""
Dim Temperatura As String = ""
Dim Hora As String = ""
Dim Chofer As String = ""
Dim CamPlaca As String = ""
Dim Camion As String = ""
Dim Rem1Placa As String = ""
Dim Remolque1 As String = ""
Dim NoPallets As String = ""
Dim NoBultos As String = ""
Dim NoKgManifiesto As String = ""
Dim Mercado As String = ""
Dim NoFactura As String = ""
Dim DivisoresdeCarton As String = ""
Dim BolsasdePlastico As String = ""
Dim TapaderasdeCarton As String = ""
Dim CAJASDECARTON As String = ""
Dim RPC As String = ""
Dim BINSDECARTON As String = ""
Dim TotalDlls As String = ""
Dim Cliente As String = ""
Dim Direccion As String = ""
Dim Correo As String = ""
Dim LongitudCaja As String = ""
Dim LineaTransportacion As String = ""
Dim SCAC As String = ""
Dim CAAT As String = ""
Dim NumeroTrailer As String = ""
Dim tablaReporte As New DataTable
'Envase = "1 1/9"
'Tamano = "Small"
'Cultivo = "Tomate"
'noPallet = "000001"
'Variedad = "Golden"
Using objnom As New ClsNominas
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0)
NoEmbarque = row("NoEmbarque").ToString()
Cliente = row("Cliente").ToString()
Direccion = row("Direccion").ToString()
Correo = row("Correo").ToString()
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
RPC = String.Format("{0:N0}", row("RPC"))
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
SubProyecto = row("SubProyecto").ToString()
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
Temperatura = row("Temperatura").ToString()
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
Chofer = row("Chofer").ToString()
CamPlaca = row("CamPlaca").ToString()
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
Rem1Placa = row("Rem1Placa").ToString()
NoFactura = row("NoFactura").ToString()
Remolque1 = String.Format("{0} ", row("NumeroTrailer"))
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
LongitudCaja = row("LongitudCaja").ToString()
LineaTransportacion = row("LineaTransportacion").ToString()
SCAC = row("SCAC").ToString()
CAAT = row("CAAT").ToString()
'If row("CveCamionRemolque1").ToString() = "1" Then
' Rem1Placa = "12-TF-5E"
' Remolque1 = "Remolque 1"
'Else
' Rem1Placa = "15-TF-7f"
' Remolque1 = "Remolque 2"
'End If
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
NoPallets = objnom.DtResultados.Rows.Count.ToString()
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
tablaReporte = objnom.DtResultados
End If
End If
'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f
End Using
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
params.Add(New ReportParameter("Cliente", Cliente))
params.Add(New ReportParameter("Direccion", Direccion))
params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("SubProyecto", SubProyecto))
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX))
params.Add(New ReportParameter("Temperatura", Temperatura))
params.Add(New ReportParameter("Hora", Hora))
params.Add(New ReportParameter("Chofer", Chofer))
params.Add(New ReportParameter("CamPlaca", CamPlaca))
params.Add(New ReportParameter("Camion", Camion))
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
params.Add(New ReportParameter("Remolque1", Remolque1))
params.Add(New ReportParameter("LongitudCaja", LongitudCaja))
params.Add(New ReportParameter("LineaTransportacion", LineaTransportacion))
params.Add(New ReportParameter("SCAC", SCAC))
params.Add(New ReportParameter("CAAT", CAAT))
params.Add(New ReportParameter("NumeroTrailer", NumeroTrailer))
params.Add(New ReportParameter("NoFactura", NoFactura))
params.Add(New ReportParameter("Mercado", Mercado))
params.Add(New ReportParameter("NoBultos", NoBultos))
params.Add(New ReportParameter("NoPallets", NoPallets))
params.Add(New ReportParameter("NoKgManifiesto", NoKgManifiesto))
'params.Add(New ReportParameter("DivisoresdeCarton", DivisoresdeCarton))
'params.Add(New ReportParameter("BolsasdePlastico", BolsasdePlastico))
'params.Add(New ReportParameter("TapaderasdeCarton", TapaderasdeCarton))
'params.Add(New ReportParameter("CAJASDECARTON", CAJASDECARTON))
'params.Add(New ReportParameter("RPC", RPC))
'params.Add(New ReportParameter("BINSDECARTON", BINSDECARTON))
'params.Add(New ReportParameter("TotalDlls", TotalDlls))
Dim lrds As New List(Of ReportDataSource)
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 pdf = StreamPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = pdf, .NombreArchivo = String.Format("{0}.pdf", "DatosCartaPorte")})
Dim ObjMail As New ClsSisMail()
If ObjMail.SendMail(UsuarioActual.Empresa, Correo, "Datos carta porte", "", "", LSRutasMail) Then
'ResultadoMail = 1
Else
'GuardaLogFacturacion($"No se envio el correo {Mail}, {Asunto}, {Cuerpo}, {MailCC},")
'GuardaLogFacturacion($"Ruta XML {ArchivoXML}")
'ResultadoMail = 3
End If
ImprimirPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte", Content_Disposition:="inline")
End Sub
Private Sub imprimirpallet2(cvePallet As Integer) Private Sub imprimirpallet2(cvePallet As Integer)
Dim Envase As String = "" Dim Envase As String = ""
Dim Tamano As String = "" Dim Tamano As String = ""

View File

@@ -41,6 +41,10 @@
<DataField>Cultivo</DataField> <DataField>Cultivo</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="Manifiesto">
<DataField>Manifiesto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CultivoVariedad"> <Field Name="CultivoVariedad">
<DataField>CultivoVariedad</DataField> <DataField>CultivoVariedad</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
@@ -1497,7 +1501,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>GROWER ALLIANCE</Value> <Value>=Parameters!Cliente.Value</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
@@ -1688,7 +1692,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>947 E. FRONTAGE RD.</Value> <Value>=Parameters!Direccion.Value</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
@@ -1879,7 +1883,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>RIO RICO</Value> <Value />
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
@@ -6833,13 +6837,13 @@
<TablixBody> <TablixBody>
<TablixColumns> <TablixColumns>
<TablixColumn> <TablixColumn>
<Width>2.5cm</Width> <Width>1.73271cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.5cm</Width> <Width>1.68042cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>5.74021cm</Width> <Width>7.32708cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>3.69064cm</Width> <Width>3.69064cm</Width>
@@ -7122,7 +7126,9 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!NoPallets.Value</Value> <Value>=Fields!NoPallets.Value</Value>
<Style /> <Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@@ -7140,6 +7146,7 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -7152,7 +7159,9 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!NoCajas.Value</Value> <Value>=Fields!NoCajas.Value</Value>
<Style /> <Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@@ -7170,25 +7179,28 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Cultivo"> <Textbox Name="Manifiesto">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Paragraphs> <Paragraphs>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!Cultivo.Value &amp; " " &amp; Fields!CultivoVariedad.Value</Value> <Value>=Fields!Manifiesto.Value</Value>
<Style /> <Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Cultivo</rd:DefaultName> <rd:DefaultName>Manifiesto</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>LightGrey</Color> <Color>LightGrey</Color>
@@ -7200,6 +7212,7 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -7212,7 +7225,9 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!Etiqueta.Value</Value> <Value>=Fields!Etiqueta.Value</Value>
<Style /> <Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@@ -7230,6 +7245,7 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -7242,7 +7258,9 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!Envase.Value</Value> <Value>=Fields!Envase.Value</Value>
<Style /> <Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@@ -7260,6 +7278,7 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
</TablixCells> </TablixCells>
@@ -7447,6 +7466,18 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Direccion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Cliente">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="logojam"> <EmbeddedImage Name="logojam">

File diff suppressed because it is too large Load Diff

View File

@@ -41,6 +41,10 @@
<DataField>Cultivo</DataField> <DataField>Cultivo</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="Manifiesto">
<DataField>Manifiesto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CultivoVariedad"> <Field Name="CultivoVariedad">
<DataField>CultivoVariedad</DataField> <DataField>CultivoVariedad</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
@@ -307,10 +311,8 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>GROWER ALLIANCE</Value> <Value>=Parameters!Cliente.Value</Value>
<Style> <Style />
<FontSize>8pt</FontSize>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@@ -413,9 +415,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>12 Ave. Acaponeta <Value>=Parameters!Direccion.Value</Value>
Rio Rico, AZ 85648</Value>
<Style /> <Style />
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -437,138 +437,7 @@ Rio Rico, AZ 85648</Value>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox38"> <Textbox Name="Textbox50">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox38</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox39">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox39</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<RightBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>2pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox32">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<LeftBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>2pt</Width>
</LeftBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox43">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox43</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox33">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Paragraphs> <Paragraphs>
@@ -597,7 +466,7 @@ Rio Rico, AZ 85648</Value>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox44"> <Textbox Name="Textbox51">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Paragraphs> <Paragraphs>
@@ -672,6 +541,7 @@ Rio Rico, AZ 85648</Value>
</Style> </Style>
</Textbox> </Textbox>
<ColSpan>2</ColSpan> <ColSpan>2</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell /> <TablixCell />
@@ -739,12 +609,11 @@ Rio Rico, AZ 85648</Value>
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember />
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<Top>4.15396cm</Top> <Top>3.38667cm</Top>
<Left>2.00862cm</Left> <Left>1.98216cm</Left>
<Height>3.6cm</Height> <Height>3cm</Height>
<Width>14.9871cm</Width> <Width>14.9871cm</Width>
<Style> <Style>
<Border> <Border>
@@ -2370,7 +2239,15 @@ Hermosillo, Sonora, Mexico
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>CAAT: 32VU <Value>CAAT:</Value>
<Style />
</TextRun>
<TextRun>
<Value>=Parameters!CAAT.Value</Value>
<Style />
</TextRun>
<TextRun>
<Value xml:space="preserve">
</Value> </Value>
<Style /> <Style />
</TextRun> </TextRun>
@@ -2531,7 +2408,7 @@ Hermosillo, Sonora, Mexico
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>LCT-03</Value> <Value>=Parameters!Remolque1.Value</Value>
<Style /> <Style />
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -2774,8 +2651,8 @@ Hermosillo, Sonora, Mexico
<TablixMember /> <TablixMember />
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<Top>9.57248cm</Top> <Top>6.74144cm</Top>
<Left>1.44748cm</Left> <Left>1.39456cm</Left>
<Height>6cm</Height> <Height>6cm</Height>
<Width>16.05095cm</Width> <Width>16.05095cm</Width>
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
@@ -2786,7 +2663,7 @@ Hermosillo, Sonora, Mexico
</Style> </Style>
</Tablix> </Tablix>
</ReportItems> </ReportItems>
<Height>8.9547in</Height> <Height>5.96512in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.64435in</Width> <Width>7.64435in</Width>
@@ -2977,6 +2854,18 @@ Hermosillo, Sonora, Mexico
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Cliente">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Direccion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="logojam"> <EmbeddedImage Name="logojam">

View File

@@ -31,7 +31,7 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None"> EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
@@ -97,11 +97,11 @@
</div> </div>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-md-12" runat="server" visible="false" id="DvNumeroTrailler"> <div class="form-group form-md-line-input input-iconright col-md-12" runat="server" visible="false" id="DvNumeroTrailler">
<asp:TextBox ID="TxtNumeroTrailer" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox> <asp:TextBox ID="TxtNumeroTrailer" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
<asp:Label AssociatedControlID="TxtNumeroTrailer" runat="server" Text="Número De Unidad"></asp:Label> <asp:Label AssociatedControlID="TxtNumeroTrailer" runat="server" Text="Número De Unidad"></asp:Label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-md-6"> <div class="form-group form-md-line-input input-iconright col-md-6">
@@ -230,8 +230,8 @@
</div> </div>
<div class="row" runat="server" id="DVSCACCAAT" visible="false"> <div class="row" runat="server" id="DVSCACCAAT" visible="false">
<div class="col-md-6" > <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSCAC" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtSCAC" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtSCAC.ClientID.ToString()%>">SCAC:</label> <label for="<%= TxtSCAC.ClientID.ToString()%>">SCAC:</label>
@@ -248,10 +248,19 @@
</div> </div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright" runat="server" id="Div1">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveProveedor" DataTextField="RazonSocial" Style="padding: 0px">
</asp:DropDownList>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="DdlTipoPermisoSCT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Permiso SCT''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
<i></i>
</div>
</div>
</div>
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%> <%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View File

@@ -19,11 +19,17 @@ Partial Class Inventarios_CatUnidades
Private Sub Catalogos_CatPtoSubFunsion_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Catalogos_CatPtoSubFunsion_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaCombos() CargaCombos()
CargaDdlProveedor()
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
Private Sub CargaDdlProveedor()
DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
End Sub
@@ -88,6 +94,7 @@ Partial Class Inventarios_CatUnidades
TxtEspecificacionNuevo.Text = "" TxtEspecificacionNuevo.Text = ""
TxtEspecificacionNuevo.Text = "" TxtEspecificacionNuevo.Text = ""
DdlConfigAuto.SelectedValueExist(-1) DdlConfigAuto.SelectedValueExist(-1)
DdlProveedor.SelectedValueExist(-1)
TxtAnio.Text = "" TxtAnio.Text = ""
'TxtTipoPermisoSCT.Text = "" 'TxtTipoPermisoSCT.Text = ""
@@ -137,8 +144,9 @@ Partial Class Inventarios_CatUnidades
TxtNumPolizaSeguroMedioAmbiente.Text = GvRow.DataKey("NumPolizaSeguroMedioAmbiente") TxtNumPolizaSeguroMedioAmbiente.Text = GvRow.DataKey("NumPolizaSeguroMedioAmbiente")
TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga") TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga")
TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga") TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga")
DdlTiposRemolque.SelectedValueExist(CveTipoRemolque) DdlTiposRemolque.SelectedValueExist(CveTipoRemolque)
DdlProveedor.SelectedValueExist(-1)
DdlProveedor.SelectedValueExist(GvRow.DataKey("CveProveedor"))
TxtNumeroTrailer.Text = GvRow.DataKey("NumeroTrailer") TxtNumeroTrailer.Text = GvRow.DataKey("NumeroTrailer")
TxtLongitudCaja.Text = GvRow.DataKey("LongitudCaja") TxtLongitudCaja.Text = GvRow.DataKey("LongitudCaja")
@@ -207,6 +215,9 @@ Partial Class Inventarios_CatUnidades
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
Alert("Unidad actualizada correctamente") Alert("Unidad actualizada correctamente")
Using objbase = New ClsClaseBase()
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))
End Using
Else Else
ErrorPrceso = True ErrorPrceso = True
End If End If
@@ -214,6 +225,8 @@ Partial Class Inventarios_CatUnidades
End Using End Using
If Not ErrorPrceso Then If Not ErrorPrceso Then
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
CargaDatos() CargaDatos()

View File

@@ -474,6 +474,8 @@