-- documentos de bdh
This commit is contained in:
@@ -236,9 +236,7 @@ Partial Class Inicio
|
||||
'Evaluacion del proveedor
|
||||
CargaEvaluacionProveedor()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DVDescargasBDH.Visible = True
|
||||
End If
|
||||
CargaDocumentacion()
|
||||
|
||||
End If
|
||||
|
||||
@@ -1298,37 +1296,61 @@ Partial Class Inicio
|
||||
RegistraScript("$('#DvUnoaUno').modal('hide')")
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkDecargaDoc_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' Dim NombreArchivo As String = DirectCast(sender, LinkButton).Attributes("NombreArchivo")
|
||||
' Dim filePath As String = $"{Server.MapPath("~")}\Documentacion\140\{DirectCast(sender, LinkButton).Attributes("NombreArchivo")}"
|
||||
#Region "DOCUMENTACION"
|
||||
|
||||
Private Sub CargaDocumentacion()
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DVDescargasBDH.Visible = True
|
||||
|
||||
' Dim Archivo As New System.IO.FileInfo(filePath)
|
||||
Dim TmpDT = New DataTable()
|
||||
|
||||
Dim ObjDoc As New ClsEdocumentacion
|
||||
If ObjDoc.DocumentacionGet(-1, -1, 1, UsuarioActual.Empresa.CveEmpresa, Modulo:=8) Then
|
||||
Dim dtt As New DataTable
|
||||
dtt = ObjDoc.DtResultados
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
|
||||
' Dim mimeType As String = Nothing
|
||||
TmpDT.Columns.Add(New DataColumn("Nombre", GetType(String)))
|
||||
TmpDT.Columns.Add(New DataColumn("Liga", GetType(String)))
|
||||
TmpDT.Columns.Add(New DataColumn("Nombre2", GetType(String)))
|
||||
TmpDT.Columns.Add(New DataColumn("Liga2", GetType(String)))
|
||||
'Dim i As Integer = 0
|
||||
'Dim Nombre As String = ""
|
||||
'Dim Liga As String = ""
|
||||
Dim drr As DataRow
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
|
||||
' If Archivo.Exists Then
|
||||
If (dr("Consec").ToString.ToEntero Mod 2) = 1 Then 'primer renglón
|
||||
drr = TmpDT.NewRow
|
||||
drr("Nombre") = dr("Documentacion").ToString
|
||||
drr("Liga") = String.Format("/Compras/PopUpVerFactura.aspx?p={0}", Encripta(String.Format("op=File&File={0}\Formatos\{1}_{2}", UsuarioActual.Empresa.Ruta, dr("CveDocumentacion"), dr("DocumentacionFormato")).Replace("\", "/").Replace("//", "/")))
|
||||
TmpDT.Rows.Add(drr)
|
||||
Else
|
||||
TmpDT.Rows((dr("Consec").ToString.ToEntero / 2) - 1)("Nombre2") = dr("Documentacion").ToString
|
||||
TmpDT.Rows((dr("Consec").ToString.ToEntero / 2) - 1)("Liga2") = String.Format("/Compras/PopUpVerFactura.aspx?op={0}", Encripta(String.Format("op=File&File={0}\Formatos\{1}_{2}", UsuarioActual.Empresa.Ruta, dr("CveDocumentacion"), dr("DocumentacionFormato")).Replace("\", "/").Replace("//", "/")))
|
||||
End If
|
||||
Next
|
||||
|
||||
' HttpContext.Current.Response.Buffer = True
|
||||
' HttpContext.Current.Response.Clear()
|
||||
' HttpContext.Current.Response.ClearContent()
|
||||
' HttpContext.Current.Response.ContentType = mimeType
|
||||
' HttpContext.Current.Response.AppendHeader("Content-disposition", "inline; filename=" & NombreArchivo)
|
||||
' HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
' HttpContext.Current.Response.TransmitFile(filePath)
|
||||
' HttpContext.Current.Response.Flush()
|
||||
' HttpContext.Current.Response.SuppressContent = True
|
||||
' HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
' HttpContext.Current.Response.End()
|
||||
End If
|
||||
End If
|
||||
ObjDoc.Dispose()
|
||||
|
||||
' Archivo = Nothing
|
||||
' End If
|
||||
GvDoc.DataSource = TmpDT
|
||||
GvDoc.DataBind()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDoc_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Nombre2") <> "" Then
|
||||
e.Row.FindControl("divdoc20").Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user