retroalimentacion de los filtros del reportes

This commit is contained in:
Antonio Gonzalez
2020-12-03 11:14:22 -07:00
parent 921cee2e47
commit 480b6aaa5a
3 changed files with 144 additions and 141 deletions

View File

@@ -41,36 +41,36 @@ Public Class ClsRH
Public Sub Commit() Public Sub Commit()
SqlTransacc.Commit() SqlTransacc.Commit()
End Sub End Sub
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
Public ReadOnly Property DSResultados() As DataSet Public ReadOnly Property DSResultados() As DataSet
Get Get
DSResultados = DSet DSResultados = DSet
End Get End Get
End Property End Property
#End Region #End Region
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then If TransaccionCompartida Is Nothing Then
SqlConexion = New SqlConnection SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try Try
SqlConexion.Open() SqlConexion.Open()
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True EsTransaccionCompartida = True
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd() ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -80,23 +80,23 @@ Public Class ClsRH
End With End With
Data = New DataTable Data = New DataTable
End Sub End Sub
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False Private EsTransaccionCompartida As Boolean = False
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo 'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
@@ -141,7 +141,7 @@ Public Class ClsRH
Return Retorno Return Retorno
End Function End Function
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -178,7 +178,7 @@ Public Class ClsRH
Return Retorno Return Retorno
End Function End Function
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer, Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1549,7 +1549,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer, CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer,
CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer, CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer,
CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer, CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer,
FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer, FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer,
CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1820,8 +1820,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CelularPersonal", SqlDbType.VarChar).Value = CelularPersonal .Add("@CelularPersonal", SqlDbType.VarChar).Value = CelularPersonal
.Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido .Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido
.Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno .Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -1937,8 +1937,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
.Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo .Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo
.Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso .Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
End With End With
Try Try
@@ -1955,16 +1955,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado") SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@SDI", SqlDbType.Money).Value = SDI .Add("@SDI", SqlDbType.Money).Value = SDI
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -1973,8 +1973,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateSalarios") SqlDataAdapter("PA_RH_PersonalUpdateSalarios")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -1985,7 +1985,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
.Add("@SDI", SqlDbType.Money).Value = SDI .Add("@SDI", SqlDbType.Money).Value = SDI
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS .Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI .Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -1994,16 +1994,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_MovimientosToSUA") SqlDataAdapter("PA_RH_MovimientosToSUA")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -2012,17 +2012,17 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateRFCValidado") SqlDataAdapter("PA_RH_PersonalUpdateRFCValidado")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@RFC", SqlDbType.VarChar).Value = RFC .Add("@RFC", SqlDbType.VarChar).Value = RFC
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok .Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -2031,14 +2031,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateesTemporal") SqlDataAdapter("PA_RH_PersonalUpdateesTemporal")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@isOk", SqlDbType.Bit).Value = estemporal .Add("@isOk", SqlDbType.Bit).Value = estemporal
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -2052,8 +2052,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double,
CvePersonal As Integer, CveEmpresa As Integer) As Boolean CvePersonal As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateMasivo") SqlDataAdapter("PA_RH_PersonalUpdateMasivo")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno .Add("@CveTurno", SqlDbType.Int).Value = CveTurno
@@ -2391,8 +2391,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function AddAsistenciaMasiva2(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function AddAsistenciaMasiva2(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -2418,9 +2418,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "Asistencias Detalles" #Region "Asistencias Detalles"
Public Function GetAsistenciasDetalle() As Boolean Public Function GetAsistenciasDetalle() As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -3442,7 +3442,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno .Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad .Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
.Add("@CveUsuario", SqlDbType.Int).Value = RHRequerido.CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = RHRequerido.CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento .Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
End With End With
@@ -3464,8 +3464,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveRequerimiento", SqlDbType.Int).Value = RHRequerido.CveRequerimiento .Add("@CveRequerimiento", SqlDbType.Int).Value = RHRequerido.CveRequerimiento
.Add("@CveSubProyecto", SqlDbType.Int).Value = RHRequerido.CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = RHRequerido.CveSubProyecto
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno .Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad .Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento .Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
End With End With
@@ -3480,13 +3480,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Function End Function
Public Function RemovePersonalRequerido(CveRequerimiento As Integer, CveEmpresa As Integer) As Boolean Public Function RemovePersonalRequerido(CveRequerimiento As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_PersonalRequeridoRemove") DataAdapter("PA_RH_PersonalRequeridoRemove")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveRequerimiento", SqlDbType.Int).Value = CveRequerimiento .Add("@CveRequerimiento", SqlDbType.Int).Value = CveRequerimiento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
@@ -3504,10 +3504,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "ClsRHReportePersonalNecesidades" #Region "ClsRHReportePersonalNecesidades"
Public Function GetReportePersonalNecesidades(CveTurno As Integer, CveProyecto As Integer, tCveSubProyeto As Integer, Estatus As Integer, CveEmpresa As Integer, CveDepartamento As Integer) As Boolean Public Function GetReportePersonalNecesidades(CveTurno As Integer, CveProyecto As Integer, tCveSubProyeto As Integer, Estatus As Integer, CveEmpresa As Integer, CveDepartamento As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -3529,9 +3529,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al obtener el Reporte de Necesidades de Personal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al obtener el Reporte de Necesidades de Personal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "ClsRHReporteRotacionPersonal" #Region "ClsRHReporteRotacionPersonal"
Public Function GetReporteRotacionPersonal(FechaInicio As Date, FechaFin As Date, CveTurno As Integer, CveProyecto As Integer, CveSubProyeto As Integer, CveEmpresa As Integer) As Boolean Public Function GetReporteRotacionPersonal(FechaInicio As Date, FechaFin As Date, CveTurno As Integer, CveProyecto As Integer, CveSubProyeto As Integer, CveEmpresa As Integer) As Boolean
@@ -4158,16 +4158,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch exs As SqlException Catch exs As SqlException
If exs.Message.Contains("Número: 547;") Then If exs.Message.Contains("Número: 547;") Then
OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else Else
OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If End If
'If exs.ErrorCode = -2146232060 Then 'If exs.ErrorCode = -2146232060 Then
' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
'Else 'Else
@@ -4463,7 +4463,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@Beneficiario", SqlDbType.Bit).Value = Beneficiario .Add("@Beneficiario", SqlDbType.Bit).Value = Beneficiario
End With End With
@@ -4498,9 +4498,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@Beneficiario", SqlDbType.Int).Value = Beneficiario .Add("@Beneficiario", SqlDbType.Int).Value = Beneficiario
End With End With
Try Try
@@ -6747,9 +6747,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", "")) ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", ""))
ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString))
End If End If
@@ -6875,11 +6875,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "Checador" #Region "Checador"
Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorGet") DataAdapter("PA_RH_ChecadorGet")
@@ -6894,18 +6894,18 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al obtener el listado de checadores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al obtener el listado de checadores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function AddChecadores(Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, CveUsuario As Integer, Optional CveModelo As Integer = 1, Optional Estatus As Integer = 1) As Boolean Public Function AddChecadores(Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, CveUsuario As Integer, Optional CveModelo As Integer = 1, Optional Estatus As Integer = 1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorAdd") DataAdapter("PA_RH_ChecadorAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Checador", SqlDbType.NVarChar).Value = Checador .Add("@Checador", SqlDbType.NVarChar).Value = Checador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal .Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto .Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo .Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@Estatus", SqlDbType.Int).Value = Estatus
End With End With
Try Try
@@ -6915,18 +6915,18 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al agregar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al agregar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateChecadores(CveChecador As Integer, Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, Optional CveModelo As Integer = 1, Optional Estatus As Boolean = True) As Boolean Public Function UpdateChecadores(CveChecador As Integer, Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, Optional CveModelo As Integer = 1, Optional Estatus As Boolean = True) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorUpdate") DataAdapter("PA_RH_ChecadorUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador .Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@Checador", SqlDbType.NVarChar).Value = Checador .Add("@Checador", SqlDbType.NVarChar).Value = Checador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal .Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto .Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo .Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With End With
Try Try
@@ -6936,8 +6936,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al actualizar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al actualizar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function RemoveChecadores(CveChecador As Integer) As Boolean Public Function RemoveChecadores(CveChecador As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorDelete") DataAdapter("PA_RH_ChecadorDelete")
@@ -6951,21 +6951,21 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al eliminar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al eliminar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
'Public msgsError As New StringBuilder() 'Public msgsError As New StringBuilder()
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "") 'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) ' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
' msgsError.AppendLine(Mensaje) ' msgsError.AppendLine(Mensaje)
' msgsError.Append("<br/>") ' msgsError.Append("<br/>")
' 'Alert(Obj, Mensaje, TipoMensaje.MsgError) ' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) ' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
'End Sub 'End Sub
#Region " IDisposable Support " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)
'If msgsError.ToString().Length > 0 Then 'If msgsError.ToString().Length > 0 Then
' Alert(msgsError.ToString(), TipoMensaje.MsgError) ' Alert(msgsError.ToString(), TipoMensaje.MsgError)

View File

@@ -84,14 +84,13 @@
<label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Usuario Registró:</label> <label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Usuario Registró:</label>
<div class="col-md-2" runat="server"> <div class="col-md-2" runat="server">
<asp:DropDownList ID="DdlUsuarios" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveUsuario" DataTextField="Nombre" ValidationGroup="GrpGuardar" CssClass="select2me"> <asp:DropDownList ID="DdlUsuarios" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveUsuario" DataTextField="Nombre" ValidationGroup="GrpGuardar" CssClass="select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label runat="server" ID="lblSubProyecto" class="col-md-1 " style="margin-top: 5px; font-size:12px;">Subproyecto:</asp:Label> <asp:Label runat="server" ID="lblSubProyecto" class="col-md-1 " style="margin-top: 5px; font-size:12px;">Subproyecto:</asp:Label>
<div class="col-md-2" runat="server"> <div class="col-md-2" runat="server">
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me"> <asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>

View File

@@ -94,7 +94,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
{ {
DdlProveedores.setEsWebService(true); DdlProveedores.setEsWebService(true);
DdlProveedores.Attributes.Add("data-metodo", "getproveedores"); DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
DdlProveedores.SelectedText = "Seleccione"; DdlProveedores.SelectedText = "Todos";
DdlProveedores.SelectedValue = "-1"; DdlProveedores.SelectedValue = "-1";
} }
@@ -158,6 +158,10 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
if (DdlProveedores.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; } if (DdlProveedores.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; }
String Estatus; String Estatus;
if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; } if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
String Usuario;
if (DdlUsuarios.SelectedValue != "-1") { Usuario = $"&emsp;<b>Usuario:</b> {DdlUsuarios.SelectedItem.Text}"; } else { Usuario = ""; }
String SubProyectos;
if (DdlSubProyecto.SelectedValue != "-1") { SubProyectos = $"&emsp;<b>{lblSubProyecto.Text}:</b> {DdlSubProyecto.SelectedItem.Text}"; } else { SubProyectos = ""; }
if (DtDatos.Rows.Count > 0) if (DtDatos.Rows.Count > 0)
{ {
@@ -167,7 +171,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue)); para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue));
String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}"; String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}{Usuario}{SubProyectos}";
para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}"))); para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}")));
if (Imagen.Exists) if (Imagen.Exists)
{ {