- activar la descarga personalizada
This commit is contained in:
@@ -58,29 +58,34 @@
|
|||||||
Reporte de Compras
|
Reporte de Compras
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UppAcciones">
|
||||||
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
<ContentTemplate>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
<ContentTemplate>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
<li>
|
||||||
</asp:UpdatePanel>
|
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Personalizado</asp:LinkButton>
|
||||||
<li>
|
</li>
|
||||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
<li>
|
||||||
</li>
|
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
</li>
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal" ></i> Ver Grafica</asp:LinkButton>
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal" ></i> Ver Grafica</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -8,7 +8,15 @@ Imports Microsoft.Reporting.WebForms
|
|||||||
Partial Class Compras_RepCompras
|
Partial Class Compras_RepCompras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
|
Private Property Personalizo As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("Personalizo").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("Personalizo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property TCEspecifico As Double
|
Private Property TCEspecifico As Double
|
||||||
Get
|
Get
|
||||||
If ViewState("TCEspecifico") Is Nothing Then
|
If ViewState("TCEspecifico") Is Nothing Then
|
||||||
@@ -43,6 +51,7 @@ Partial Class Compras_RepCompras
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
Personalizo = 0
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -289,8 +298,16 @@ Partial Class Compras_RepCompras
|
|||||||
GvDatos.Columns(15).Visible = True
|
GvDatos.Columns(15).Visible = True
|
||||||
Else
|
Else
|
||||||
GvDatos.Columns(15).Visible = False
|
GvDatos.Columns(15).Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Personalizo = 1
|
||||||
|
If Personalizo = 1 Then
|
||||||
|
ImgExcelPersonalizado.Visible = True
|
||||||
|
Else
|
||||||
|
ImgExcelPersonalizado.Visible = False
|
||||||
End If
|
End If
|
||||||
|
UppAcciones.Update()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -398,9 +415,14 @@ Partial Class Compras_RepCompras
|
|||||||
|
|
||||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CambioGrafica()
|
CambioGrafica()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||||
|
|
||||||
|
GvDatos.ExportToExcel("Compras_" & NowADS().ToShortDateString)
|
||||||
|
'GvDatos.ExportToExcelG("DetalleCompras_" & NowADS().ToShortDateString & ".xlsx")
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -3,37 +3,46 @@
|
|||||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UppAcciones">
|
||||||
<li>
|
<ContentTemplate>
|
||||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
|
||||||
</li>
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server">
|
<asp:LinkButton ID="LnkExportar" runat="server">
|
||||||
<i class="fa fa-ad-excel"></i> Exportar Excel
|
<i class="fa fa-ad-excel"></i> Exportar Excel
|
||||||
</asp:LinkButton>
|
</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li runat="server" id="LiImprimir" visible="false">
|
<li>
|
||||||
<asp:LinkButton ID="Lnkimprimir" runat="server">
|
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Personalizado</asp:LinkButton>
|
||||||
<i class="fa fa-print"></i> Imprimir Remesa
|
</li>
|
||||||
</asp:LinkButton>
|
<li runat="server" id="LiImprimir" visible="false">
|
||||||
</li>
|
<asp:LinkButton ID="Lnkimprimir" runat="server">
|
||||||
<asp:UpdatePanel runat="server">
|
<i class="fa fa-print"></i> Imprimir Remesa
|
||||||
<ContentTemplate>
|
</asp:LinkButton>
|
||||||
<li>
|
</li>
|
||||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
|
||||||
</li>
|
<li>
|
||||||
</ContentTemplate>
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||||
</asp:UpdatePanel>
|
</li>
|
||||||
<li>
|
|
||||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
<li>
|
||||||
</li>
|
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
</li>
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||||
|
<asp:PostBackTrigger ControlID="Lnkimprimir" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
|||||||
@@ -28,6 +28,15 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property Personalizo As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("Personalizo").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("Personalizo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property TCEspecifico As Double
|
Private Property TCEspecifico As Double
|
||||||
Get
|
Get
|
||||||
If ViewState("TCEspecifico") Is Nothing Then
|
If ViewState("TCEspecifico") Is Nothing Then
|
||||||
@@ -62,6 +71,7 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
Personalizo = 0
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaParametrosInicio()
|
CargaParametrosInicio()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
@@ -460,10 +470,22 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
GvDatos.Columns(14).Visible = ChkFecha.Checked
|
GvDatos.Columns(14).Visible = ChkFecha.Checked
|
||||||
GvDatos.Columns(15).Visible = ChkObs.Checked
|
GvDatos.Columns(15).Visible = ChkObs.Checked
|
||||||
GvDatos.Columns(16).Visible = ChkDescripcion.Checked
|
GvDatos.Columns(16).Visible = ChkDescripcion.Checked
|
||||||
|
|
||||||
|
Personalizo = 1
|
||||||
|
If Personalizo = 1 Then
|
||||||
|
ImgExcelPersonalizado.Visible = True
|
||||||
|
Else
|
||||||
|
ImgExcelPersonalizado.Visible = False
|
||||||
|
End If
|
||||||
|
UppAcciones.Update()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||||
|
|
||||||
|
GvDatos.ExportToExcel("DetalleCompras_" & NowADS().ToShortDateString)
|
||||||
|
'GvDatos.ExportToExcelG("DetalleCompras_" & NowADS().ToShortDateString & ".xlsx")
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user