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()
SqlTransacc.Commit()
End Sub
End Sub
#End Region
#Region "Propiedades"
Public ReadOnly Property DSResultados() As DataSet
Get
DSResultados = DSet
End Get
End Property
End Property
#End Region
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then
SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try
SqlConexion.Open()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
Else
SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If
SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then
SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try
SqlConexion.Open()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
Else
SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If
SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand
@@ -80,23 +80,23 @@ Public Class ClsRH
End With
Data = New DataTable
End Sub
Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#Region "Conexiones"
Private Sub ConexionAdd()
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
Try
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.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("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
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
Try
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.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("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
@@ -141,7 +141,7 @@ Public Class ClsRH
Return Retorno
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
Dim Retorno As Boolean = False
@@ -178,7 +178,7 @@ Public Class ClsRH
Return Retorno
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
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,
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,
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
Dim Retorno As Boolean = False
@@ -1820,8 +1820,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CelularPersonal", SqlDbType.VarChar).Value = CelularPersonal
.Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido
.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
End With
@@ -1937,8 +1937,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
.Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo
.Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
End With
Try
@@ -1955,16 +1955,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try
Return Retorno
End Function
Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean
End Function
Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado")
With SqlAdapter.SelectCommand.Parameters
.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("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
End With
Try
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)
End Try
Return Retorno
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
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
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateSalarios")
With SqlAdapter.SelectCommand.Parameters
@@ -1985,7 +1985,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
.Add("@SDI", SqlDbType.Money).Value = SDI
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
End With
Try
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)
End Try
Return Retorno
End Function
Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean
End Function
Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_MovimientosToSUA")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
End With
Try
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)
End Try
Return Retorno
End Function
Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean
End Function
Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateRFCValidado")
With SqlAdapter.SelectCommand.Parameters
.Add("@RFC", SqlDbType.VarChar).Value = RFC
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok
.Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok
End With
Try
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)
End Try
Return Retorno
End Function
Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean
End Function
Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateesTemporal")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@isOk", SqlDbType.Bit).Value = estemporal
.Add("@isOk", SqlDbType.Bit).Value = estemporal
End With
Try
SqlAdapter.Fill(Data)
@@ -2052,8 +2052,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double,
CvePersonal As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_PersonalUpdateMasivo")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
@@ -2391,8 +2391,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try
Return Retorno
End Function
End Function
Public Function AddAsistenciaMasiva2(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -2418,9 +2418,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try
Return Retorno
End Function
End Function
#End Region
#Region "Asistencias Detalles"
Public Function GetAsistenciasDetalle() As Boolean
Dim Retorno As Boolean = False
@@ -3442,7 +3442,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
.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
End With
@@ -3464,8 +3464,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveRequerimiento", SqlDbType.Int).Value = RHRequerido.CveRequerimiento
.Add("@CveSubProyecto", SqlDbType.Int).Value = RHRequerido.CveSubProyecto
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
End With
@@ -3480,13 +3480,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Function
Public Function RemovePersonalRequerido(CveRequerimiento As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_PersonalRequeridoRemove")
DataAdapter("PA_RH_PersonalRequeridoRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRequerimiento", SqlDbType.Int).Value = CveRequerimiento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveRequerimiento", SqlDbType.Int).Value = CveRequerimiento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
@@ -3504,10 +3504,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
End Try
Return Retorno
End Function
End Function
#End Region
#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
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())
End Try
Return Retorno
End Function
End Function
#End Region
#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
@@ -4158,16 +4158,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch exs As SqlException
If exs.Message.Contains("Número: 547;") Then
Catch exs As SqlException
If exs.Message.Contains("Número: 547;") Then
OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
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
' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
'Else
@@ -4463,7 +4463,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@Beneficiario", SqlDbType.Bit).Value = Beneficiario
End With
@@ -4498,9 +4498,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@Beneficiario", SqlDbType.Int).Value = Beneficiario
.Add("@Beneficiario", SqlDbType.Int).Value = Beneficiario
End With
Try
@@ -6747,9 +6747,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", ""))
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", ""))
ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString))
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())
End Try
Return Retorno
End Function
End Function
#End Region
#Region "Checador"
#Region "Checador"
Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
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())
End Try
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
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@Estatus", SqlDbType.Int).Value = Estatus
End With
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())
End Try
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
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With
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())
End Try
Return Retorno
End Function
End Function
Public Function RemoveChecadores(CveChecador As Integer) As Boolean
Dim Retorno As Boolean = False
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())
End Try
Return Retorno
End Function
#End Region
'Public msgsError As New StringBuilder()
'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))
' msgsError.AppendLine(Mensaje)
' msgsError.Append("<br/>")
' '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))
'End Sub
End Function
#End Region
'Public msgsError As New StringBuilder()
'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))
' msgsError.AppendLine(Mensaje)
' msgsError.Append("<br/>")
' '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))
'End Sub
#Region " IDisposable Support "
' IDisposable
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
'If msgsError.ToString().Length > 0 Then
' 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>
<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:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<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">
<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>
</div>
</div>

View File

@@ -94,7 +94,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
{
DdlProveedores.setEsWebService(true);
DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
DdlProveedores.SelectedText = "Seleccione";
DdlProveedores.SelectedText = "Todos";
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 = ""; }
String 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)
{
@@ -167,7 +171,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
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}")));
if (Imagen.Exists)
{