Reporte Agredores Fechas
This commit is contained in:
@@ -4350,11 +4350,13 @@ Public Class ClsBancos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetAcreedoresReporte(CveEmpresa As Integer) As Boolean
|
Public Function GetAcreedoresReporte(CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Banc_AcreedorReporte")
|
DataAdapter("PA_Banc_AcreedorReporte")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -385,6 +385,93 @@
|
|||||||
|
|
||||||
<ajax:TabPanel ID="TabReporte" runat="server" HeaderText="Reporte">
|
<ajax:TabPanel ID="TabReporte" runat="server" HeaderText="Reporte">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="PFiltroReporte" class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultarReporte" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultarReporte_Click" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row text-size-12">
|
||||||
|
|
||||||
|
<div class="col-md-1"><span>Fecha Inicio:</span></div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||||
|
<%--width: 120px !important;--%>
|
||||||
|
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||||
|
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="LnkTxtFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<ajax:MaskedEditExtender ID="METxtFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CETxtFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkTxtFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
|
||||||
|
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 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="CVTxtFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" 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="GpoReporte"></asp:CompareValidator>
|
||||||
|
|
||||||
|
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="margin-left: 20px"><span>Fecha Fin:</span></div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
|
||||||
|
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||||
|
<%--width: 120px !important;--%>
|
||||||
|
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="LnkTxtFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="METxtFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CETxtFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkTxtFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
|
||||||
|
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtFechaFin" 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="CVTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" 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="GpoReporte"></asp:CompareValidator>
|
||||||
|
|
||||||
|
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCECVTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none;">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:UpdatePanel ID="UpReporte" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpReporte" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -931,14 +931,29 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
#region"REPORTE"
|
#region"REPORTE"
|
||||||
protected void CargaReporte()
|
protected void CargaReporte()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
DateTime FInicio = MinFecha;
|
||||||
|
DateTime FFin = MaxFecha;
|
||||||
|
|
||||||
|
if(TxtFechaInicio.Text.Length == 10)
|
||||||
|
{
|
||||||
|
FInicio = TxtFechaInicio.Text.ToDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TxtFechaFin.Text.Length == 10)
|
||||||
|
{
|
||||||
|
FFin = TxtFechaFin.Text.ToDate();
|
||||||
|
}
|
||||||
|
|
||||||
ClsBancos bancos = new ClsBancos();
|
ClsBancos bancos = new ClsBancos();
|
||||||
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa))
|
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa, FInicio, FFin))
|
||||||
{
|
{
|
||||||
GvReporte.DataSource = bancos.DtResultados;
|
GvReporte.DataSource = bancos.DtResultados;
|
||||||
GvReporte.DataBind();
|
GvReporte.DataBind();
|
||||||
}
|
}
|
||||||
bancos.Dispose();
|
bancos.Dispose();
|
||||||
UpReporte.Update();
|
UpReporte.Update();
|
||||||
|
|
||||||
}
|
}
|
||||||
protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -970,4 +985,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
UpMovAcreedor.Update();
|
UpMovAcreedor.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void BtnConsultarReporte_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CargaReporte();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user