Clientes busqueda cuenta, correcion descarga documentos cat documentos, ajustes servicio domicilio
This commit is contained in:
@@ -50,7 +50,8 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento" EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
|
||||
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
||||
@@ -111,7 +112,8 @@
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
||||
<asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoadFormato_ClickDocumentacion" runat="server" Visible="false"
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -418,8 +418,11 @@ Partial Class RH_CatDocumentos
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
|
||||
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
|
||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
|
||||
|
||||
'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
||||
|
||||
Dim separado As Char() = {"."}
|
||||
Dim array() As String = DocumetacionFormato.Split(separado)
|
||||
Dim extencion As String = ""
|
||||
@@ -430,27 +433,50 @@ Partial Class RH_CatDocumentos
|
||||
|
||||
If DocumetacionFormato.Trim.Length > 0 Then
|
||||
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
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 Formato'></i></a>", linkDescarga, DocumetacionFormato)
|
||||
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 Formato'></i></a>", linkDescarga, DocumetacionFormato)
|
||||
End If
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
Dim FileD = New FileInfo(PathDescargaArchivo)
|
||||
|
||||
If FileD.Exists Then
|
||||
ImgDownLoadFormato.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
|
||||
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
|
||||
Dim DocumetacionFormato As String = GvRow.DataKey("DocumentacionFormato").ToString
|
||||
|
||||
Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
|
||||
|
||||
Dim FileD = New FileInfo(PathDescargaArchivo)
|
||||
|
||||
If FileD.Exists Then
|
||||
|
||||
Response.Clear()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name)
|
||||
Response.AddHeader("Content-Length", FileD.Length.ToString())
|
||||
Response.ContentType = "text/octet-stream"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(FileD.FullName)
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -670,5 +696,7 @@ Partial Class RH_CatDocumentos
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user