- nuevo moduloa
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
<asp:Literal runat="server" ID="LtlEncabezado" Text="Reporte Lineas Adicionales"></asp:Literal>
|
||||
<asp:Literal runat="server" ID="LtlEncabezado" Text="Reporte Vencimientos"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
@@ -38,17 +38,45 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" runat="server" id="DVProveedor1" visible="false">Comercializador:</div>
|
||||
<div class="col-md-2" runat="server" id="DVProveedor2" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" SelectedText="-" runat="server" CssStyle="width: 100%; selected2me; " Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="select2me"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate" >Cliente:</div>
|
||||
<div class="col-md-2 ">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" >Estatus:</div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
|
||||
@@ -88,8 +116,8 @@
|
||||
|
||||
<div class="row " runat="server" visible ="false" id="DvLinea">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,7 +132,7 @@
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
<asp:GridView ID="GvD" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
|
||||
@@ -27,17 +27,17 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
|
||||
private int TipoLinea
|
||||
{
|
||||
get { return (ViewState["TipoLinea"] == null) ? 1: int.Parse(ViewState["TipoLinea"].ToString()); }
|
||||
get { return (ViewState["TipoLinea"] == null) ? 1: int.Parse(ViewState["TipoLinea"].ToString()); }
|
||||
set { ViewState["TipoLinea"] = (int)value; }
|
||||
}
|
||||
|
||||
private DataTable DTDatosGvLineasAdicionales
|
||||
private DataTable DTDatosGvD
|
||||
{
|
||||
get
|
||||
get
|
||||
{
|
||||
if (ViewState["DTDatosGvLineasAdicionales"] == null)
|
||||
if (ViewState["DTDatosGvD"] == null)
|
||||
{
|
||||
ViewState["DTDatosGvLineasAdicionales"] = new DataTable();
|
||||
ViewState["DTDatosGvD"] = new DataTable();
|
||||
}
|
||||
return (DataTable)ViewState["DTDatosGvD"];
|
||||
}
|
||||
@@ -66,45 +66,14 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
InicializaValores();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
|
||||
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
|
||||
{
|
||||
DVProveedor1.Visible = true;
|
||||
DVProveedor2.Visible = true;
|
||||
TipoLinea = 2;
|
||||
LtlEncabezado.Text = "Reporte PO";
|
||||
GvLAPO.Visible = true;
|
||||
DvLineaPO.Visible = true;
|
||||
DVAgrupador1.Visible = true;
|
||||
DVAgrupador2.Visible = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DvLinea.Visible = true;
|
||||
GvLineasAdicionales.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(105) == "1") {
|
||||
DdlProveedor.setEsWebService(true);
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||
DdlProveedor.SelectedText = "Todos";
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
}else {
|
||||
DdlProveedor.setEsWebService(false);
|
||||
DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = NowADS().ToShortDateString();
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
@@ -115,29 +84,29 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
DTDatosGvD = new DataTable();
|
||||
LnkDescargaExcel.Visible = false;
|
||||
LnkDescargaExcel.Visible = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
int CveProveedor = -1;
|
||||
|
||||
if(TipoLinea == 1)
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), 1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvLineasAdicionales.DataSource = objVentas.DtResultados;
|
||||
GvD.DataSource = objVentas.DtResultados;
|
||||
|
||||
if (objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DTDatosGvD = objVentas.DtResultados;
|
||||
LnkDescargaExcel.Visible = true;
|
||||
UpAcciones.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,7 +126,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
|
||||
if (objVentas.RepLineasAdicionales(DdlAgrupador.SelectedValue.ToEntero(), -1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 2, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvLAPO.DataSource = objVentas.DtResultados;
|
||||
GvLAPO.DataSource = objVentas.DtResultados;
|
||||
|
||||
if (objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
@@ -169,7 +138,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
else
|
||||
{
|
||||
GvLAPO.DataSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
objVentas.Dispose();
|
||||
@@ -301,7 +270,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
objVentas.Dispose();
|
||||
}
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user