Compras mensaje IEPS, Personal descarga de documentos, efacturas correciones verificar solicitudes SAT

This commit is contained in:
rakcsle
2024-10-26 11:18:08 -07:00
parent c4b1b86110
commit 88c592c9a1
8 changed files with 135 additions and 66 deletions

View File

@@ -4079,8 +4079,12 @@
<asp:UpdatePanel ID="UPGvDocumentosFirma" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdatePanel ID="UpGvDocumentosFirma2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-12">
<asp:GridView ID="GvDocumentosFirma" runat="server" AutoGenerateColumns="False" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,DocumentacionFormato,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns>
@@ -4149,7 +4153,9 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
<%--<asp:Literal ID="ImgDownLoad" runat="server" ></asp:Literal>--%>
<asp:LinkButton ID="ImgDownLoad" CssClass="btn btn-circle btn-sm blue" OnClick="ImgDownLoad_Click" runat="server"
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
</ItemTemplate>
</asp:TemplateField>
@@ -4161,6 +4167,7 @@
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
<asp:UpdatePanel ID="UpImprimir" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table runat="server" visible="false" class="table table-hover table-advance Widthall">

View File

@@ -7,6 +7,7 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms
Imports System.Globalization
Imports System.Data.SqlTypes
Imports DocumentFormat.OpenXml.Drawing.Diagrams
Partial Class RH_Personal
Inherits ClsPaginas
@@ -4357,6 +4358,7 @@ Partial Class RH_Personal
objRH.Dispose()
End Sub
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosFirma.RowDataBound
@@ -4364,7 +4366,8 @@ Partial Class RH_Personal
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
Dim ImgDownLoad As LinkButton = e.Row.FCLinkButton("ImgDownLoad")
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False)
@@ -4417,14 +4420,18 @@ Partial Class RH_Personal
If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True
If extencion.Length > 0 Then
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion & "." & extencion)
Else
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion)
End If
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoad)
'If extencion.Length > 0 Then
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion & "." & extencion)
'Else
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion)
'End If
Else
ImgDownLoad.Visible = False
End If
Else
ImgDownLoad.Visible = False
End If
@@ -4438,6 +4445,35 @@ Partial Class RH_Personal
End If
End Sub
Protected Sub ImgDownLoad_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Adjunto As String = GvRow.DataKey("Adjunto").ToString()
Dim ArchivoPath As String = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
DescargarArchivo(ArchivoPath)
End Sub
Protected Sub DescargarArchivo(rutaArchivo As String)
If System.IO.File.Exists(rutaArchivo) Then
Dim nombreArchivo As String = System.IO.Path.GetFileName(rutaArchivo)
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=" & nombreArchivo)
Response.AddHeader("Content-Length", New System.IO.FileInfo(rutaArchivo).Length.ToString())
Response.WriteFile(rutaArchivo)
Response.End()
Else
End If
End Sub
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -8160,5 +8196,7 @@ Partial Class RH_Personal
args.IsValid = retorno
End Sub
End Class