filtro de tipoperiodo y puesto, se agregó la visualización de columna de horas dobles y triples

This commit is contained in:
2023-05-22 15:00:59 -07:00
parent 0926a9a10d
commit 8265a891e0
3 changed files with 44 additions and 42 deletions

View File

@@ -2649,7 +2649,7 @@ Public Class ClsRH
Return Retorno
End Function
Public Function RepGetAsistencias(Grupo As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CvePersonalPadre As Integer) As Boolean
Public Function RepGetAsistencias(Grupo As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CvePersonalPadre As Integer, CveTipoPeriodo As Integer, CvePuesto As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_RepPersonalAsistenciasGet")
@@ -2663,7 +2663,8 @@ Public Class ClsRH
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CvePersonalPadre", SqlDbType.Int).Value = CvePersonalPadre
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
.Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
.Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
End With
Try

View File

@@ -47,14 +47,8 @@
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="text-align:right">
Cliente:
</div>
<div class="col-md-1">
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
<asp:Label ID="LblCliente" runat="server" class="col-md-1 truncate">Cliente:</asp:Label>
<div class="col-md-2" id="divCliente" runat="server">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
</div>
@@ -145,7 +139,20 @@
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" class="col-md-1 truncate">Tipo Periodo: </asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="form-control select2me input-sm" Style="width: 100% !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" class="col-md-1 truncate">Puesto: </asp:Label>
<div class="col-md-1">
<asp:DropDownList ID="DdlPuesto" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="form-control select2me input-sm" Style="width: 100% !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>

View File

@@ -14,10 +14,16 @@ Partial Class RH_RepAsistencias
CargaClientes()
CargaProyecto()
CargaTurnos()
CargaTiposPeriodo()
TxtFechaAsistenciaFin.Text = Now.ToShortDateString
TxtFechaAsistencia.Text = $"01/{Now.ToString("MM")}/{Now.Year}"
If UsuarioActual.Empresa.Funcionalidad(267) = "1" Then ' emp citricola
divCliente.Visible = False
LblCliente.Visible = False
GV.Columns(2).Visible = False
GV.Columns(3).Visible = True
End If
End If
End Sub
@@ -45,21 +51,16 @@ Partial Class RH_RepAsistencias
End Sub
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()
'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()
DdlCliente.DataBind()
End Sub
Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
CargaClientes()
'DdlCliente.Attributes.Remove("onclick")
'DdlCliente.DataBind()
End Sub
Private Sub CargaProyecto()
@@ -85,6 +86,13 @@ Partial Class RH_RepAsistencias
Private Sub CargaTurnos()
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
DdlTurno.DataBind()
DdlPuesto.DataSource = GlobalDTRHPuestos(UsuarioActual.CveEmpresa)
DdlPuesto.databind
End Sub
Private Sub CargaTiposPeriodo()
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo
DdlTipoPeriodo.DataBind()
End Sub
#End Region
@@ -105,7 +113,7 @@ Partial Class RH_RepAsistencias
Dim CveClienteAsignado As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
If objpersonal.RepGetAsistencias(DdlGrupo.SelectedValue.ToEntero, CveClienteAsignado, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, TxtFechaAsistencia.Text.Trim.ToDate,
TxtFechaAsistenciaFin.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlSupervisorOrganigrama.SelectedValue.ToEntero()) Then
TxtFechaAsistenciaFin.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlSupervisorOrganigrama.SelectedValue.ToEntero(), DdlTipoPeriodo.SelectedValue.ToEntero, DdlPuesto.SelectedValue.ToEntero) Then
dtTemp = objpersonal.DtResultados
GvMostrarColumnas(dtTemp)
@@ -143,7 +151,6 @@ Partial Class RH_RepAsistencias
Private Sub GvMostrarColumnas(dt As DataTable)
Dim index = 1
For index = 1 To dt.Columns.Count - 5
CType(GV.Columns(index + 4), BoundField).DataField = dt.Columns(index + 4).ColumnName
GV.Columns(index + 4).Visible = True
@@ -153,13 +160,7 @@ Partial Class RH_RepAsistencias
Else
CType(GV.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
End If
Next
UpDatos.Update()
End Sub
@@ -167,17 +168,10 @@ Partial Class RH_RepAsistencias
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("Ordenador").ToEntero = 0 Then
If e.Row.DataKey("Ordenador") = "0" Then
e.Row.CssClass = "SubTotales"
End If
' e.Row.Attributes.Add("style", "max-height: 22px;")
End If
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click