Calendario de Viajes AF Codigo Descripcion, orden cronograma por sub tipo activo fijo

This commit is contained in:
rakcsle
2024-05-07 10:26:18 -07:00
parent 9b9c22af4e
commit 838a88f2d1
6 changed files with 58 additions and 18 deletions

View File

@@ -59,14 +59,14 @@
</div>
<div class="col-md-2">
<div class="form-group form-md-line-input input-iconright contenedor-fijo" >
<asp:DropDownList ID="DdlMesNacimiento" CssClass="form-control select2me" runat="server" Width="78px" AutoPostBack="true" OnSelectedIndexChanged="DdlMesNacimiento_SelectedIndexChanged"></asp:DropDownList>
<label for="<%= DdlMesNacimiento.ClientID.ToString()%>">Mes día Nacimiento:</label>
<asp:DropDownList ID="DdlDiaNacimiento" CssClass="form-control select2me" runat="server" Width="78px" AutoPostBack="true" OnSelectedIndexChanged="DdlDiaNacimiento_SelectedIndexChanged" ></asp:DropDownList>
<label for="<%= DdlDiaNacimiento.ClientID.ToString()%>">Día Mes Nacimiento:</label>
</div>
</div>
<div class="col-md-2">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDiaNacimiento" CssClass="form-control select2me" runat="server" Width="100%" ></asp:DropDownList>
<label for="<%= DdlDiaNacimiento.ClientID.ToString()%>"> </label>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMesNacimiento" CssClass="form-control select2me" runat="server" Width="78px" AutoPostBack="true" OnSelectedIndexChanged="DdlMesNacimiento_SelectedIndexChanged"></asp:DropDownList>
<label for="<%= DdlMesNacimiento.ClientID.ToString()%>"></label>
</div>
</div>
<div class="col-md-4">

View File

@@ -80,6 +80,7 @@ Partial Class UserControl_AddMedico
Private Sub LlenarMeses()
DdlMesNacimiento.Items.Clear()
DdlMesNacimiento.Items.Add(New ListItem("-", "-1"))
DdlMesNacimiento.Items.Add(New ListItem("Enero", "1"))
@@ -95,19 +96,37 @@ Partial Class UserControl_AddMedico
DdlMesNacimiento.Items.Add(New ListItem("Nomviembre", "11"))
DdlMesNacimiento.Items.Add(New ListItem("Diciembre", "12"))
DdlDiaNacimiento.Items.Add(New ListItem("-", "-1"))
For dia As Integer = 1 To 31
DdlDiaNacimiento.Items.Add(New ListItem(dia.ToString(), dia.ToString()))
Next
End Sub
Protected Sub DdlMesNacimiento_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlDiaNacimiento.Items.Clear()
If DdlMesNacimiento.SelectedValue <> "" Then
ValidaFechaNacimiento()
End Sub
Protected Sub DdlDiaNacimiento_SelectedIndexChanged(sender As Object, e As EventArgs)
ValidaFechaNacimiento()
End Sub
Private Sub ValidaFechaNacimiento()
If DdlDiaNacimiento.SelectedValue.ToEntero > 0 AndAlso DdlMesNacimiento.SelectedValue.ToEntero > 0 Then
Dim mes As Integer = Integer.Parse(DdlMesNacimiento.SelectedValue)
Dim año As Integer = DateTime.Now.Year ' Asume año actual para calcular los días
Dim diasEnMes As Integer = System.DateTime.DaysInMonth(año, mes)
Dim diasEnMes As Integer = System.DateTime.DaysInMonth(2000, mes)
If DdlDiaNacimiento.SelectedValue.ToEntero > diasEnMes Then
DdlDiaNacimiento.SelectedValueExist(diasEnMes)
End If
DdlDiaNacimiento.Items.Add(New ListItem("-", "-1"))
For dia As Integer = 1 To diasEnMes
DdlDiaNacimiento.Items.Add(New ListItem(dia.ToString(), dia.ToString()))
Next
End If
UpModal.Update()
End Sub
Sub CargaVendedores()
@@ -648,4 +667,6 @@ Partial Class UserControl_AddMedico
End Class