--Se agrego variable de CveEstado a métodos y PA. Se agregó columna de estado y DdlEstado. Se agregó funcionalidad OnChange para cambiar si el viaje es nacional o no y mostrar diferentes estados y se modificaron métodos para poder incluir CveEstado y NombreEstado

This commit is contained in:
AbrahamCastilloV
2024-03-16 16:53:39 -07:00
parent 710621dc32
commit 4f2885020c
4 changed files with 100 additions and 75 deletions

View File

@@ -48,7 +48,7 @@
</div>
<asp:GridView ID="GvDestinos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveDestino, Destino, EsNacional, Estatus, CveUsuario, FechaIng, CveEmpresa">
data-sort="true" DataKeyNames="CveDestino, Destino, EsNacional, Estatus, CveUsuario, FechaIng, CveEmpresa, CveEstado">
<Columns>
<asp:TemplateField HeaderText="Destino">
<ItemTemplate>
@@ -69,6 +69,12 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estado">
<ItemTemplate>
<asp:Literal ID="LtlEstado" runat="server" Text='<%# Eval("NombreEstado") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditarDestino" runat="server" AlternateText="Editar"
@@ -215,7 +221,7 @@
<div class="col-md-8">
<asp:DropDownList ID="DdlEsNacional" runat="server" Class="table-group-action-input form-control input-inline select2me"
AppendDataBoundItems="true"
Width="99.9%">
Width="99.9%" OnSelectedIndexChanged="OnChangeNacional" AutoPostBack="true">
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
<asp:ListItem Text="Sí" Value="True"></asp:ListItem>
<asp:ListItem Text="No" Value="False"></asp:ListItem>
@@ -247,6 +253,24 @@
</ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row my-1">
<label class="col-md-4">Estado:</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlEstado" runat="server" Class="table-group-action-input form-control input-inline select2me"
DataTextField="NombreEstado"
DataValueField="CveEstado"
AppendDataBoundItems="true"
Width="99.9%">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVEstado" runat="server" ControlToValidate="DdlEstado"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEEstado" runat="server" HighlightCssClass="vco"
TargetControlID="RFVEstado" Width="400px" BehaviorID="VCEEstado">
</ajax:ValidatorCalloutExtender>
</div>
</div>
</asp:Panel>
<%-- Importes --%>
<asp:Panel ID="PnImporte" runat="server" Visible="false">