Correcion en validaciones y servicio a domicilio
This commit is contained in:
@@ -494,7 +494,7 @@
|
||||
<tr align="left" id="TrServicioDomicilio" runat="server" visible="false">
|
||||
<td><b>Servicio a Domicilio:</b> </td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkServicioDomicilio" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
|
||||
<asp:CheckBox ID="ChkServicioDomicilio" runat="server" AutoPostBack="true" OnCheckedChanged="ChkServicioDomicilio_CheckedChanged" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -928,7 +928,7 @@
|
||||
</div>
|
||||
<div class=" col-sm-8">
|
||||
<div class="Widthall" style="overflow-x: auto;">
|
||||
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Origen,CvePS" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Consec,Origen,CodigoPS,CvePS,Serie,AplicaSerie" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -2790,21 +2790,22 @@
|
||||
<div class="col-md-4">
|
||||
<label>Año:</label>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label>Usado:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlRecepcionUsados" CssClass="form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="CodigoPS" DataValueField="CvePSCargo" Width="100%" OnSelectedIndexChanged="DdlRecepcionUsados_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:DropDownList ID="DdlRecepcionUsados" CssClass="form-control input-sm select2me" runat="server" DataTextField="CodigoPS" DataValueField="CvePSCargo" Width="100%" OnSelectedIndexChanged="DdlRecepcionUsados_SelectedIndexChanged" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>BCI:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -2813,6 +2814,7 @@
|
||||
<asp:DropDownList ID="DdlMarcaUsado" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarcaUsado" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Marca" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:CustomValidator ID="RFVMarcaUsado" runat="server" ClientValidationFunction="ValidaMarcaUsado" ControlToValidate="DdlMarcaUsado" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
||||
<label for="<%= DdlMarcaUsado.ClientID.ToString()%>">Marca:</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2969,6 +2971,8 @@
|
||||
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVBCIAjuste" runat="server" ControlToValidate="DdlBCIAjuste" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''BCI''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEBCIAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVBCIAjuste" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -3135,8 +3139,7 @@
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpAgregar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- <asp:Button ID="BtnCalculaMesesUso" Text="" OnClick="BtnCalculaMesesUso_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
<asp:Button ClientIDMode="Static" ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" UseSubmitBehavior="false" />
|
||||
<asp:Button ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -3176,6 +3179,26 @@
|
||||
}
|
||||
});
|
||||
|
||||
function ValidaMarcaUsado(val, args) {
|
||||
//VALIDA SOLO SI SE SELECCIONO UN USADO
|
||||
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
|
||||
if (cveUsado > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
} else {
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaAnioVehiculo(val, args) {
|
||||
//VALIDA SOLO SI SE SELECCIONO UN USADO
|
||||
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
|
||||
if (cveUsado > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
} else {
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidarCodigoEnsamble(source, arguments) {
|
||||
let CveMarca = HdnPSAjusteMarca.value;
|
||||
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
||||
|
||||
Reference in New Issue
Block a user