Cambios en folios de garantia
This commit is contained in:
@@ -3076,7 +3076,7 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" Enabled="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" OnTextChanged="TxtConsecutivoAjuste_TextChanged"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label>
|
||||
|
||||
@@ -5319,6 +5319,12 @@ Partial Class PV
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If AgregarPS() Then
|
||||
@@ -7091,6 +7097,7 @@ Partial Class PV
|
||||
If Not CalculaMesesUso() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
@@ -8180,4 +8187,26 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Protected Sub TxtConsecutivoAjuste_TextChanged(sender As Object, e As EventArgs)
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidaConsecutivo() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
If DdlFolioGarantia.SelectedValue.ToEntero() > 0 Then
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(DdlFolioGarantia.SelectedValue.ToEntero(), CveEstatusConsecutivo:=1, Consec:=TxtConsecutivoAjuste.Text.ToEntero()) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user