Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -28,7 +28,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 control-label">Movimiento:</label>
|
<label class="col-md-2 control-label">Movimiento:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<asp:DropDownList ID="DdlTipoTransanccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlTipoTransanccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
|
||||||
|
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransanccionPrestamo_SelectedIndexChanged" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccionPrestamo" runat="server" ControlToValidate="DdlTipoTransanccionPrestamo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPrestamo"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTipoTransaccionPrestamo" runat="server" ControlToValidate="DdlTipoTransanccionPrestamo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPrestamo"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceTipoTransancionPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccionPrestamo" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceTipoTransancionPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccionPrestamo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -71,6 +72,12 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo3" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendarioPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo3" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendarioPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
<asp:RangeValidator ID="RVTxtFechaPrestamo" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||||
|
OnInit="RVTxtFechaPrestamo_Init"
|
||||||
|
ControlToValidate="TxtFechaPrestamo" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -155,7 +162,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 control-label">Movimiento:</label>
|
<label class="col-md-2 control-label">Movimiento:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<asp:DropDownList ID="DdlTipoTransaccion" Width="100%" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlTipoTransaccion" Width="100%" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
|
||||||
|
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransaccion_SelectedIndexChanged" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -201,6 +209,12 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||||
|
OnInit="RVTxtFechaDocumento_Init"
|
||||||
|
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
CargarCentrosDeCosto(null, null, null, LblSubProyecto);
|
CargarCentrosDeCosto(null, null, null, LblSubProyecto);
|
||||||
LblSubProyecto2.Text = LblSubProyecto.Text;
|
LblSubProyecto2.Text = LblSubProyecto.Text;
|
||||||
|
|
||||||
|
ValidaFechaDocumentoDiasPosterioresPrestamo();
|
||||||
|
ValidaFechaDocumentoDiasPosteriores();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,4 +838,93 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
{
|
{
|
||||||
CargaReporte();
|
CargaReporte();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected void DdlTipoTransaccion_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ValidaFechaDocumentoDiasPosteriores();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void RVTxtFechaDocumento_Init(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
|
||||||
|
Calendario.EndDate = NowADS().AddDays(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidaFechaDocumentoDiasPosteriores()
|
||||||
|
{
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
|
||||||
|
|
||||||
|
Calendario.EndDate = NowADS().AddDays(3);
|
||||||
|
|
||||||
|
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
|
||||||
|
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
|
||||||
|
if (DdlTipoTransaccion.SelectedValue == "1" || DdlTipoTransaccion.SelectedValue == "16")
|
||||||
|
{
|
||||||
|
// cheques, 3 meses
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
|
||||||
|
Calendario.EndDate = NowADS().AddMonths(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// transfer, 3 semanas
|
||||||
|
if (DdlTipoTransaccion.SelectedValue == "2")
|
||||||
|
{
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
|
||||||
|
Calendario.EndDate = NowADS().AddDays(21);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpDatos.Update();
|
||||||
|
//UpGuardar.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected void DdlTipoTransanccionPrestamo_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ValidaFechaDocumentoDiasPosterioresPrestamo();
|
||||||
|
}
|
||||||
|
protected void RVTxtFechaPrestamo_Init(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(2).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddDays(2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidaFechaDocumentoDiasPosterioresPrestamo()
|
||||||
|
{
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(3).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
|
||||||
|
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddDays(3);
|
||||||
|
|
||||||
|
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
|
||||||
|
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
|
||||||
|
if (DdlTipoTransanccionPrestamo.SelectedValue == "1" || DdlTipoTransanccionPrestamo.SelectedValue == "16")
|
||||||
|
{
|
||||||
|
// cheques, 3 meses
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddMonths(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// transfer, 3 semanas
|
||||||
|
if (DdlTipoTransanccionPrestamo.SelectedValue == "2")
|
||||||
|
{
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(21).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddDays(21);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpPrestamo.Update();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
<label>Tipo Movimiento:</label>
|
<label>Tipo Movimiento:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlTipoTransaccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlTipoTransaccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
|
||||||
|
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransaccionPrestamo_SelectedIndexChanged" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccionPrestamo" runat="server" ControlToValidate="DdlTipoTransaccionPrestamo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPrestamo"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTipoTransaccionPrestamo" runat="server" ControlToValidate="DdlTipoTransaccionPrestamo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPrestamo"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceTipoTransancionPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccionPrestamo" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceTipoTransancionPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccionPrestamo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -95,6 +96,12 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo3" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendarioPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo3" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendarioPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
<asp:RangeValidator ID="RVTxtFechaPrestamo" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||||
|
OnInit="RVTxtFechaPrestamo_Init"
|
||||||
|
ControlToValidate="TxtFechaPrestamo" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -209,7 +216,8 @@
|
|||||||
<label>Tipo Movimiento:</label>
|
<label>Tipo Movimiento:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
|
||||||
|
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransaccion_SelectedIndexChanged" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -263,6 +271,12 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||||
|
OnInit="RVTxtFechaDocumento_Init"
|
||||||
|
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
TxtImporte.Attributes.Add("disabled", "disabled");
|
TxtImporte.Attributes.Add("disabled", "disabled");
|
||||||
CargarCentrosDeCosto(null, null, null, LblSubProyecto);
|
CargarCentrosDeCosto(null, null, null, LblSubProyecto);
|
||||||
LblSubProyecto2.Text = LblSubProyecto.Text;
|
LblSubProyecto2.Text = LblSubProyecto.Text;
|
||||||
|
|
||||||
|
ValidaFechaDocumentoDiasPosterioresPrestamo();
|
||||||
|
ValidaFechaDocumentoDiasPosteriores();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,6 +375,48 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
if (ObjComp != null)
|
if (ObjComp != null)
|
||||||
ObjComp.Dispose();
|
ObjComp.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DdlTipoTransaccionPrestamo_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ValidaFechaDocumentoDiasPosterioresPrestamo();
|
||||||
|
}
|
||||||
|
protected void RVTxtFechaPrestamo_Init(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(2).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddDays(2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidaFechaDocumentoDiasPosterioresPrestamo()
|
||||||
|
{
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(3).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
|
||||||
|
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddDays(3);
|
||||||
|
|
||||||
|
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
|
||||||
|
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
|
||||||
|
if (DdlTipoTransaccionPrestamo.SelectedValue == "1" || DdlTipoTransaccionPrestamo.SelectedValue == "16")
|
||||||
|
{
|
||||||
|
// cheques, 3 meses
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddMonths(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// transfer, 3 semanas
|
||||||
|
if (DdlTipoTransaccionPrestamo.SelectedValue == "2")
|
||||||
|
{
|
||||||
|
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(21).ToShortDateString();
|
||||||
|
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
|
||||||
|
CalendarioPrestamo.EndDate = NowADS().AddDays(21);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpPrestamo.Update();
|
||||||
|
//UpGuardar.Update();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region "PAGO DEUDORES"
|
#region "PAGO DEUDORES"
|
||||||
@@ -830,4 +875,52 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
TxtFechaDocumento.Attributes.Remove("onchange");
|
TxtFechaDocumento.Attributes.Remove("onchange");
|
||||||
DivImporteME.Visible = false;
|
DivImporteME.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected void DdlTipoTransaccion_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ValidaFechaDocumentoDiasPosteriores();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void RVTxtFechaDocumento_Init(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
|
||||||
|
Calendario.EndDate = NowADS().AddDays(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidaFechaDocumentoDiasPosteriores()
|
||||||
|
{
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
|
||||||
|
|
||||||
|
Calendario.EndDate = NowADS().AddDays(3);
|
||||||
|
|
||||||
|
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
|
||||||
|
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
|
||||||
|
if (DdlTipoTransaccion.SelectedValue == "1" || DdlTipoTransaccion.SelectedValue == "16")
|
||||||
|
{
|
||||||
|
// cheques, 3 meses
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
|
||||||
|
Calendario.EndDate = NowADS().AddMonths(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// transfer, 3 semanas
|
||||||
|
if (DdlTipoTransaccion.SelectedValue == "2")
|
||||||
|
{
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString();
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
|
||||||
|
Calendario.EndDate = NowADS().AddDays(21);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpMovDeudor.Update();
|
||||||
|
//UpGuardar.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -109,11 +109,12 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||||
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:RangeValidator ID="RVTxtFechaDocumentoMenor" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento está fuera de lo permitido" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
<%--<asp:RangeValidator ID="RVTxtFechaDocumentoMenor" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento está fuera de lo permitido" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1714,8 +1714,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||||
RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-38).ToShortDateString
|
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString
|
||||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
'RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-38).ToShortDateString
|
||||||
|
'RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||||
Calendario.EndDate = NowADS().AddDays(2)
|
Calendario.EndDate = NowADS().AddDays(2)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1724,7 +1725,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
|
|
||||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
|
||||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(3).ToShortDateString
|
'RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(3).ToShortDateString
|
||||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual"
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual"
|
||||||
|
|
||||||
Calendario.EndDate = NowADS().AddDays(3)
|
Calendario.EndDate = NowADS().AddDays(3)
|
||||||
|
|||||||
@@ -82,6 +82,13 @@
|
|||||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 d<>as de la fecha actual"
|
||||||
|
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
DdlTipoMovto_SelectedIndexChanged(Nothing, Nothing)
|
DdlTipoMovto_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -616,6 +617,9 @@ Partial Class Bancos_Transferencias
|
|||||||
RFVTxtPaguese.Visible = True
|
RFVTxtPaguese.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ValidaFechaDocumentoDiasPosteriores()
|
||||||
|
|
||||||
UPPDatos.Update()
|
UPPDatos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -662,4 +666,36 @@ Partial Class Bancos_Transferencias
|
|||||||
DdlCajaChica.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlCajaChica.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||||
|
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString
|
||||||
|
Calendario.EndDate = NowADS().AddDays(2)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ValidaFechaDocumentoDiasPosteriores()
|
||||||
|
|
||||||
|
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 d<>as de la fecha actual"
|
||||||
|
|
||||||
|
Calendario.EndDate = NowADS().AddDays(3)
|
||||||
|
|
||||||
|
If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual"
|
||||||
|
Calendario.EndDate = NowADS().AddMonths(3)
|
||||||
|
End If
|
||||||
|
If DdlTipoMovto.SelectedValue = "2" Then 'transfer, 3semanas
|
||||||
|
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString
|
||||||
|
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual"
|
||||||
|
Calendario.EndDate = NowADS().AddDays(21)
|
||||||
|
End If
|
||||||
|
|
||||||
|
UPPDatos.Update()
|
||||||
|
'UpGuardar.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user