E140 nuevo modulo Acumuladores / Rep Acumuladores Vigencia
- modulo 174 + PA: PA_Inv_ProductosFechasComprasSerie (Ventas y SIG_Resp_MLR)
This commit is contained in:
98
Acumuladores/RepAcumuladoresVigencia.aspx
Normal file
98
Acumuladores/RepAcumuladoresVigencia.aspx
Normal file
@@ -0,0 +1,98 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.master" CodeFile="RepAcumuladoresVigencia.aspx.cs" Inherits="Acumuladores_RepAcumuladoresVigencia" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Vigencia de Acumuladores
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificaciones" runat="server" DataValueField="CveClasificacion" DataTextField="Clasificacion" class="select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1" Text="SubProyecto"></asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Inicial:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" 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: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="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Final:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" 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: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="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right! important;">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvAcum.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 200px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvAcum.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" >
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" />
|
||||
<asp:BoundField DataField="PS" HeaderText="Producto/Servicio" />
|
||||
<asp:BoundField DataField="Serie" HeaderText="Serie" />
|
||||
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha" />
|
||||
<asp:BoundField DataField="mesestranscurridos" HeaderText="M.Transc." />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
67
Acumuladores/RepAcumuladoresVigencia.aspx.cs
Normal file
67
Acumuladores/RepAcumuladoresVigencia.aspx.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using iText.Kernel.Pdf.Filters;
|
||||
using System.Activities.Expressions;
|
||||
|
||||
public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
CargaCombos();
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-9).ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString();
|
||||
UpFiltros.Update();
|
||||
}
|
||||
|
||||
private void CargaCombos()
|
||||
{
|
||||
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
|
||||
DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
|
||||
DdlClasificaciones.DataBind();
|
||||
DdlClasificaciones.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Consulta();
|
||||
}
|
||||
|
||||
private void Consulta()
|
||||
{
|
||||
ClsAcumuladores ObjAcum = new ClsAcumuladores();
|
||||
|
||||
if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvAcum.DataSource = ObjAcum.DtResultados;
|
||||
}
|
||||
ObjAcum.Dispose();
|
||||
GvAcum.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
/*protected void GvAcum_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.RowIndex == 0)
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.CssClass = "Totales";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -1312,11 +1312,35 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
#Region "VIGENCIA ACUMULADORES"
|
||||
Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Inv_ProductosFechasComprasSerie")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@FechaIni", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar los productos por serie.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " IDisposable Support "
|
||||
' IDisposable
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
If Not disposedValue Then
|
||||
If disposing Then
|
||||
|
||||
@@ -9354,6 +9354,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
|
||||
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
|
||||
PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322)
|
||||
PaginaDict.Add("/Acumuladores/RepAcumuladoresVigencia.aspx".ToUpper(), 174)
|
||||
|
||||
#End Region
|
||||
'Antes de aquí.
|
||||
Application("GlobalSIGAppPaginas") = PaginaDict
|
||||
|
||||
Reference in New Issue
Block a user