Clientes restriccion Forma de pago ,Portal Proveedores Descarga de comprobantes

This commit is contained in:
Oscar Irigoyen
2023-01-23 12:00:19 -07:00
parent b129de0176
commit 11b90a6367
6 changed files with 63 additions and 14 deletions

View File

@@ -325,7 +325,8 @@
</div>
<asp:UpdatePanel runat="server" ID="UpGvBancos" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvBancos" ViewStateMode="Enabled" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial" CssClass="ScrollAD table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
<asp:GridView ID="GvBancos" ViewStateMode="Enabled" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial" CssClass="ScrollAD table table-striped table-advance table-hover Widthall"
Style="text-align: center;" GridLines="None" DataKeyNames="Comprobante" >
<Columns>
<asp:BoundField DataField="SerieFolio" HeaderText="Factura" />
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Venta" />

View File

@@ -592,16 +592,17 @@ Partial Class Portal_PortalProveedor
Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs)
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Path As String = String.Format("{0}{1}{2}{3}", UsuarioActual.Empresa.Ruta, "IE\", Gvr.FCHiddenField("CveIe").Value, ".png")
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Path As String = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, Gvr.DataKey("Comprobante"))
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "application/png"
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=comprobante.png")
HttpContext.Current.Response.ContentType = "application/png"
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
'HttpContext.Current.Response.Flush()