E140 Acumuladores Vigencia Exporta Excel
-Tambien se corrige en nombre de archivo de RepVentasAutorizaciones
This commit is contained in:
@@ -10,6 +10,12 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<%-- <li>
|
||||||
|
<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>Exportar Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1,15 +1,46 @@
|
|||||||
using System;
|
using Extensiones;
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using Extensiones;
|
|
||||||
using System.Data;
|
|
||||||
using Microsoft.Reporting.WebForms;
|
|
||||||
using System.Activities.Expressions;
|
|
||||||
|
|
||||||
public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
|
public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
|
||||||
{
|
{
|
||||||
|
#region PROPIEDADES
|
||||||
|
private bool Consultado
|
||||||
|
{
|
||||||
|
get { return Consultado = (bool)ViewState["Consultado"]; }
|
||||||
|
set { ViewState["Consultado"] = value; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Exporta Excel PDF
|
||||||
|
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Consultado)
|
||||||
|
{
|
||||||
|
GvAcum.ExportToExcelG("RepAcumuladoresVigencia " + DateTime.Now.ToString("dd-MM-yyyy"), "Reporte de Vigencia de Acumuladores", UsuarioActual);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert("Por favor realice una consulta primero.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
protected void LnkPdf_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Consultado)
|
||||||
|
{
|
||||||
|
GvAcum.GenerarReportePDF("Reporte de Autorizaciones de Ventas");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert("Por favor realice una consulta primero.");
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
public override void VerifyRenderingInServerForm(System.Web.UI.Control control)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
@@ -20,6 +51,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
|
|||||||
|
|
||||||
private void InicializaValores()
|
private void InicializaValores()
|
||||||
{
|
{
|
||||||
|
Consultado = false;
|
||||||
CargaCombos();
|
CargaCombos();
|
||||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-24).ToShortDateString();
|
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-24).ToShortDateString();
|
||||||
txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString();
|
txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString();
|
||||||
@@ -37,6 +69,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
|
|||||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Consulta();
|
Consulta();
|
||||||
|
Consultado = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Consulta()
|
private void Consulta()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
|||||||
get { return Consultado = (bool)ViewState["Consultado"]; }
|
get { return Consultado = (bool)ViewState["Consultado"]; }
|
||||||
set { ViewState["Consultado"] = value; }
|
set { ViewState["Consultado"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user