E140 Rep Ventas Autorizaciones Exportar Excel y PDF
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<%-- <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>
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
@@ -25,13 +25,13 @@
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>--%>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i>Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>--%>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Exportar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -12,12 +12,42 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
||||
|
||||
public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
||||
{
|
||||
#region PROPIEDADES
|
||||
|
||||
private DataTable DtDatos
|
||||
{
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
|
||||
private DataTable DtDatos
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
private bool Consultado {
|
||||
get { return Consultado = (bool)ViewState["Consultado"]; }
|
||||
set { ViewState["Consultado"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Consultado)
|
||||
{
|
||||
GvDatos.ExportToExcelG("RepVentasAutorizaciones" + DateTime.Now, "Reporte de Autorizaciones de Ventas", UsuarioActual);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Por favor realice una consulta primero.");
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkPdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Consultado) {
|
||||
GvDatos.GenerarReportePDF("Reporte de Autorizaciones de Ventas");
|
||||
} else {
|
||||
Alert("Por favor realice una consulta primero.");
|
||||
}
|
||||
}
|
||||
public override void VerifyRenderingInServerForm(System.Web.UI.Control control)
|
||||
{
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -45,6 +75,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
||||
DdlClientes.setEsWebService(true);
|
||||
|
||||
|
||||
txtFechaI.Text = DateTime.Now.ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user