-- mejora combos y visual fecha

This commit is contained in:
2023-03-28 08:48:47 -07:00
parent 2c5a4f1e37
commit ad12e2cb2f
2 changed files with 30 additions and 27 deletions

View File

@@ -34,7 +34,7 @@
<div class="titlefiltros ">
<ul class="list-inline">
<li>Cliente:
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
<%--<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" Style="display: inline-block; width: 250px;" DataTextField="Nombre" DataValueField="CveCliente" Class="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -66,17 +66,20 @@
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList>
</li>
<li style="width: 227px">
<li style="width: 167px">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistencia">F. Asistencia: </asp:Label>
<asp:TextBox ID="TxtFechaAsistencia" runat="server" MaxLength="10" Width="90px" Height="28px"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgFechaAsistencia" class="btn default " Style="padding: 4px 8px;" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaAsistencia" runat="server" TargetControlID="TxtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaAsistencia" TargetControlID="TxtFechaAsistencia" PopupButtonID="ImgFechaAsistencia" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaAsistencia" runat="server" ControlToValidate="TxtFechaAsistencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Ingreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaAsistencia" runat="server" ControlToValidate="TxtFechaAsistencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Ingreso''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
&nbsp;
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaAsistencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaAsistencia" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
</ul>
</div>

View File

@@ -9,7 +9,7 @@ Partial Class RH_Asistencias
If Not IsPostBack Then
'CargaClientes()
DdlCliente.Attributes.Add("onclick", "CargaClientes();")
'DdlCliente.Attributes.Add("onclick", "CargaClientes();")
CargaSuperioresOrganigrama()
CargaProyecto()
CargaTurnos()
@@ -44,23 +44,23 @@ Partial Class RH_Asistencias
End Sub
#End Region
Private Sub CargaClientes()
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
DdlCliente.DataSource = ObjClientes.DtResultados
Else
DdlCliente.DataSource = Nothing
End If
ObjClientes.Dispose()
'Application("GlobalDTResponsable")
'Private Sub CargaClientes()
' Dim ObjClientes As New ClsClientes
' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
' DdlCliente.DataSource = ObjClientes.DtResultados
' Else
' DdlCliente.DataSource = Nothing
' End If
' ObjClientes.Dispose()
' 'Application("GlobalDTResponsable")
DdlCliente.DataBind()
End Sub
' DdlCliente.DataBind()
'End Sub
Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
CargaClientes()
DdlCliente.Attributes.Remove("onclick")
End Sub
'Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
' 'CargaClientes()
' 'DdlCliente.Attributes.Remove("onclick")
'End Sub
Private Sub CargaProyecto()
'DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"})