-- condiconal para descarga de OI, Para E13,83
This commit is contained in:
@@ -621,6 +621,48 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%-- O I --%>
|
||||||
|
<div class="mt-list-container list-todo">
|
||||||
|
<div class="list-todo-line"></div>
|
||||||
|
<ul>
|
||||||
|
<li class="mt-list-item">
|
||||||
|
<div class="list-todo-icon bg-white">
|
||||||
|
<i class="fa fa-users"></i>
|
||||||
|
</div>
|
||||||
|
<div class="list-todo-item grey">
|
||||||
|
<a class="list-toggle-container font-white" data-toggle="collapse" href="#divtaskOI" aria-expanded="false">
|
||||||
|
<div class="list-toggle done uppercase">
|
||||||
|
<div class="list-toggle-title bold">Organización Interna</div>
|
||||||
|
<div class="badge badge-default pull-right bold">1</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="task-list panel-collapse collapse " id="divtaskOI" runat="server" ClientIDMode="Static">
|
||||||
|
<ul>
|
||||||
|
<li class="task-list-item done">
|
||||||
|
<div class="task-icon">
|
||||||
|
<a href="javascript:;">
|
||||||
|
<i class="fa fa-file-pdf-o fa-3"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="task-status">
|
||||||
|
<a class="done" href="javascript:downFile('Manuales/OI/Manual OI.pdf');">
|
||||||
|
<i class="fa fa-download fa-3"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="task-content">
|
||||||
|
<h4 class="uppercase bold">Manual OI
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<%--</div>
|
<%--</div>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|||||||
@@ -1,32 +1,45 @@
|
|||||||
|
Option Explicit On
|
||||||
Partial Class Metronic_SigAyuda
|
Option Strict On
|
||||||
Inherits System.Web.UI.Page
|
|
||||||
|
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class Metronic_SigAyuda
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Sub Metronic_SigAyuda_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
If usuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
|
divtaskOI.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
|
Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
|
||||||
Try
|
Try
|
||||||
Dim docto As String = TxtDocto.Text.Replace("/", "\")
|
Dim docto As String = TxtDocto.Text.Replace("/", "\")
|
||||||
|
|
||||||
Dim path As String = $"{AppDomain.CurrentDomain.BaseDirectory}{docto}"
|
Dim path As String = $"{AppDomain.CurrentDomain.BaseDirectory}{docto}"
|
||||||
|
|
||||||
|
|
||||||
Dim file As New System.IO.FileInfo(path)
|
Dim file As New System.IO.FileInfo(path)
|
||||||
Dim mimeType As String = "text/plain"
|
Dim mimeType As String = "text/plain"
|
||||||
Try
|
Try
|
||||||
mimeType = MimeMapping.GetMimeMapping(path)
|
mimeType = MimeMapping.GetMimeMapping(path)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
'Response.Write(path)
|
'Response.Write(path)
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
Response.ClearHeaders()
|
Response.ClearHeaders()
|
||||||
Response.ClearContent()
|
Response.ClearContent()
|
||||||
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}")
|
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}")
|
||||||
Response.AddHeader("Content-Length", file.Length.ToString())
|
Response.AddHeader("Content-Length", file.Length.ToString())
|
||||||
Response.ContentType = mimeType
|
Response.ContentType = mimeType
|
||||||
Response.Flush()
|
Response.Flush()
|
||||||
Response.TransmitFile(file.FullName)
|
Response.TransmitFile(file.FullName)
|
||||||
Response.End()
|
Response.End()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
'GuardaLog($"GenerateFile: {ex.ToString()}")
|
'GuardaLog($"GenerateFile: {ex.ToString()}")
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user