BDH. Generación de txt en Reporte de Ajustes/Garantia
This commit is contained in:
@@ -255,4 +255,54 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
Protected Sub BtnGenerarTxt_Click(sender As Object, e As EventArgs)
|
||||
Dim SbTxt As New StringBuilder
|
||||
|
||||
For Each GvRow As GridViewRow In GvGarantiasDetalle.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
'1.- Consecutivo Partida-->1
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Consecutivo"))
|
||||
'2.- Cliente-->100407
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoCliente"))
|
||||
'3. Codigo De Articulo --> 171402
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoProducto"))
|
||||
'4. Tipo De Uso --> A
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoUso"))
|
||||
'5. Defecto --> P
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoDefecto"))
|
||||
'6. Codigo De Ensamble --> 1X
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoEnsamble"))
|
||||
'7. Codigo De Linea/Termico --> 9000
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoLinea"))
|
||||
'8. Codigo De Inspeccion --> J8K
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoInspeccion"))
|
||||
'9. Fecha De Venta --> 05/09/2009
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaVenta").ToDateTime().ToString("dd/MM/yyyy"))
|
||||
'10. Fecha De Reclamacion --> 05/07/2010
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaReclamacion").ToDateTime().ToString("dd/MM/yyyy"))
|
||||
'11. TipoComprobante --> 1
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("TipoComprobante"))
|
||||
'12. Comprobante --> N/A
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Comprobante"))
|
||||
'13. Autorizo --> STAN7490
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Autorizo"))
|
||||
'14. Comentarios --> Cliente 100407
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Comentarios"))
|
||||
'15. Clave De Autorizacion / Codigo Error --> P05TRBGX
|
||||
SbTxt.AppendFormat("{0}", GvRow.DataKey("ClaveAutorizacion"))
|
||||
|
||||
SbTxt.Append(vbCrLf)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim text As String = SbTxt.ToString
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.AddHeader("Content-Length", text.Length.ToString)
|
||||
Response.ContentType = "text/plain"
|
||||
Response.AppendHeader("content-disposition", $"attachment;filename=""{LblFolio.Text}.txt""")
|
||||
Response.Write(text)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user