diff --git a/Ventas/RepVentasAutorizaciones.aspx b/Ventas/RepVentasAutorizaciones.aspx index f0af1eacd..d8c3d911e 100644 --- a/Ventas/RepVentasAutorizaciones.aspx +++ b/Ventas/RepVentasAutorizaciones.aspx @@ -16,7 +16,7 @@ - <%--
  • +<%--
  • Ver Dlls en pesos
  • @@ -25,13 +25,13 @@ Ver Grafica - + --%>
  • - PDF + Generar PDF
  • - Excel -
  • --%> + Exportar Excel +
    diff --git a/Ventas/RepVentasAutorizaciones.aspx.cs b/Ventas/RepVentasAutorizaciones.aspx.cs index f230309b6..63655bfe1 100644 --- a/Ventas/RepVentasAutorizaciones.aspx.cs +++ b/Ventas/RepVentasAutorizaciones.aspx.cs @@ -12,12 +12,42 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas get { return DtDatos = (DataTable)ViewState["DtDatos"]; } set { ViewState["DtDatos"] = value; } } + private bool Consultado { + get { return Consultado = (bool)ViewState["Consultado"]; } + set { ViewState["Consultado"] = value; } + } - #endregion - protected void Page_Load(object sender, EventArgs e) + #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) { if (!IsPostBack) { + Consultado = false; InicializaValores(); } } @@ -45,6 +75,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas protected void BtnConsultar_Click(object sender, EventArgs e) { Consulta(); + Consultado = true; } private void Consulta()