-- requerido modelo auto

This commit is contained in:
2023-02-02 21:59:10 -07:00
parent 52c6fdd3dd
commit ab9198a5ab
2 changed files with 7 additions and 0 deletions

View File

@@ -2912,6 +2912,7 @@
<br /> <br />
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto"> <asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto">
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVModeloAuto" runat="server" ControlToValidate="DdlModeloAuto" InitialValue="-1" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label>Año:</label> <label>Año:</label>

View File

@@ -5510,6 +5510,11 @@ Partial Class PV
Alert("El campo año no puede ser mayor al año actual.", TipoMensaje.MsgAdvertencia) Alert("El campo año no puede ser mayor al año actual.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
If DdlModeloAuto.SelectedValue = "-1" Then
Alert("El campo modelo se debe de especificar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If End If
End If End If
@@ -7087,6 +7092,7 @@ Partial Class PV
DdlModeloAuto.DataSource = DtModelosAuto DdlModeloAuto.DataSource = DtModelosAuto
End If End If
DdlModeloAuto.DataBind() DdlModeloAuto.DataBind()
DdlModeloAuto.Items.Insert(0, New ListItem("-", "-1"))
End Sub End Sub
'Protected Sub GvRecepcionUsados_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvRecepcionUsados.RowDataBound 'Protected Sub GvRecepcionUsados_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvRecepcionUsados.RowDataBound