CveSubProyecto y filtros en el reporte de exportaciones.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using Extensiones;
|
||||
using HigLabo.Core;
|
||||
using iText.Layout.Element;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Activities;
|
||||
@@ -42,15 +43,34 @@ public partial class Export_RepExportaciones : ClsPaginas
|
||||
if (Request["Opcion"] == "I")
|
||||
EsImportacion = true;
|
||||
}
|
||||
LtlPeriodoseleccionado.Text = EsImportacion ? "Importaciones" : "Exportaciones";
|
||||
CargaExportaciones();
|
||||
//LtlPeriodoseleccionado.Text = EsImportacion ? "Importaciones" : "Exportaciones";
|
||||
InicializarValores();
|
||||
//CargaExportaciones();
|
||||
}
|
||||
}
|
||||
protected void InicializarValores()
|
||||
{
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto: DivProyecto);
|
||||
DdlProyecto.Visible = false;
|
||||
LblProyecto.Visible = false;
|
||||
DivProyecto.Visible = false;
|
||||
LblSubProyecto.Text = $"{LblSubProyecto.Text}:";
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = NowADS().ToShortDateString();
|
||||
|
||||
CargaExportaciones();
|
||||
}
|
||||
protected void CargaExportaciones()
|
||||
{
|
||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||
|
||||
bool EsExportacion = !EsImportacion;
|
||||
if (Exportaciones.GetExportacion(-1, UsuarioActual.CveEmpresa, EsExportacion))
|
||||
string SubProyectos = DdlSubProyecto.GetSelectedValuesM();
|
||||
SubProyectos = SubProyectos == "" ? "-1" : SubProyectos;
|
||||
DateTime FechaInicio = DateTime.TryParse(txtFechaI.Text, out _) ? txtFechaI.Text.ToDate() : ModExtensiones.MinFecha;
|
||||
DateTime FechaFin = DateTime.TryParse(txtFechaF.Text, out _) ? txtFechaF.Text.ToDate() : ModExtensiones.MaxFecha;
|
||||
|
||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||
if (Exportaciones.GetExportacion(-1, UsuarioActual.CveEmpresa, EsExportacion, FechaInicio, FechaFin, SubProyectos))
|
||||
{
|
||||
GVExportaciones.DataSource = Exportaciones.DtResultados;
|
||||
GVExportaciones.DataBind();
|
||||
@@ -64,6 +84,11 @@ public partial class Export_RepExportaciones : ClsPaginas
|
||||
Response.Redirect($"/Export/ExpDetalle.aspx?CveExportacion={gvRow.DataKey("CveExportacion")}", true);
|
||||
upDatosExp.Update();
|
||||
}
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaExportaciones();
|
||||
upDatosExp.Update();
|
||||
}
|
||||
protected void EliminarExp_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
Reference in New Issue
Block a user