-- documentos de bdh
This commit is contained in:
@@ -223,7 +223,28 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DescargaArchivoDirecto(RutaArchivo As String)
|
||||
If RutaArchivo <> "" Then
|
||||
|
||||
'Dim Path As String = String.Format("{0}\{1}", UsuarioActual.Empresa.Ruta, RutaArchivo)
|
||||
Dim Archivo As New System.IO.FileInfo(RutaArchivo)
|
||||
|
||||
If Archivo.Exists Then
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||
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(RutaArchivo)
|
||||
'HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
End If
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ReciboAgropecuaria()
|
||||
@@ -972,6 +993,12 @@ Partial Class PopUpVerFactura
|
||||
DescargaFactura(UrlParametros)
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "File" Then
|
||||
|
||||
DescargaArchivoDirecto(UrlParametros("FILE").ToString)
|
||||
|
||||
End If
|
||||
|
||||
'DESCARGA DOCUMENTO XML O PDF DE LA FACTURA VENTA
|
||||
If UrlParametros("OP").ToString = "FactVta" Then
|
||||
DescargaFacturaVenta(UrlParametros)
|
||||
@@ -1258,6 +1285,13 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME ENTREGAS POR REALIZAR
|
||||
If UrlParametros("OP").ToString = "FILE" Then
|
||||
If UrlParametros("CVEASIGNACIONENTREGA") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||
ImprimeEntregasPorRealizar(UrlParametros("CVEASIGNACIONENTREGA").ToString.ToLong, UrlParametros("USUARIOENTREGA").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function Parametros(Cadena As String) As Hashtable
|
||||
|
||||
179
Inicio.aspx
179
Inicio.aspx
@@ -510,136 +510,27 @@
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc1" NavigateUrl="Empresas\140\DocElectronica\Precios\AMERICA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> AMERICA</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc2" NavigateUrl="Empresas\140\DocElectronica\Precios\CRONOS.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> CRONOS</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc3" NavigateUrl="Empresas\140\DocElectronica\Precios\DIENER.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> DIENER</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc4" NavigateUrl="Empresas\140\DocElectronica\Precios\FULLPOWER.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FULL POWER</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc5" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHAGM.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH AGM</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc6" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHESPECIALES.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH ESPECIALES</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc7" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHHEAVYDUTY.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH HEAVY DUTY</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc8" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHHI-TEC.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH HI-TEC</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc9" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHSUV-VAN-MINIVAN.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH SUV-VAN-MINIVAN</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc10" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHTAXI.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH TAXI</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc11" NavigateUrl="Empresas\140\DocElectronica\Precios\LTH.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc12" NavigateUrl="Empresas\140\DocElectronica\Precios\OPTIMA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> OPTIMA</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc14" NavigateUrl="Empresas\140\DocElectronica\Precios\FiltrosPisos.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FILTROS PISOS
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc15" NavigateUrl="Empresas\140\DocElectronica\Precios\FiltrosMayoreo.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FILTROS MAYOREO
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc16" NavigateUrl="Empresas\140\DocElectronica\Precios\MOTOBATERIASLTH.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> MOTOBATERIAS LTH
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc17" NavigateUrl="Empresas\140\DocElectronica\Precios\MOTOBATERIASAMERICA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> MOTOBATERIAS AMERICA
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc18" NavigateUrl="Empresas\140\DocElectronica\Precios\ALCALINASPISOS.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> ALCALINAS PISOS
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc19" NavigateUrl="Empresas\140\DocElectronica\Precios\ALCALINASMAYOREO.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> ALCALINAS MAYOREO
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc13" NavigateUrl="Empresas\140\DocElectronica\Precios\CatAPSAGM-HT-LTH-CR 2021.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> Cat APS AGM-HT-LTH-CR 2021</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDoc" runat="server" GridLines="None" OnRowDataBound="GvDoc_RowDataBound" CssClass="table " AutoGenerateColumns="False" ShowHeader="False" Width="100%">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<asp:HyperLink ID="LnkDoc1" runat="server" NavigateUrl='<%# Eval("Liga") %>' Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> <%# Eval("Nombre") %> </asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm" id="divdoc20" runat="server" visible="false">
|
||||
<asp:HyperLink ID="LnkDoc2" runat="server" NavigateUrl='<%# Eval("Liga2") %>' Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> <%# Eval("Nombre2") %> </asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -1481,14 +1372,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalPSPorCaducar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -1528,9 +1411,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -1541,7 +1421,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1599,22 +1478,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
@@ -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