This commit is contained in:
@@ -2397,7 +2397,7 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function GetNominaEmpleadoSimulador(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, SalarioDiario As Decimal) As Boolean
|
||||
Public Function GetNominaEmpleadoSimulador(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, SalarioDiario As Decimal, CveTipoTrabajador As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
@@ -2410,6 +2410,7 @@ Public Class ClsNominas
|
||||
.Add("@Agrupador", SqlDbType.VarChar).Value = Agrupador
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@SalarioDiario", SqlDbType.Decimal).Value = SalarioDiario
|
||||
.Add("@CveTipoTrabajador", SqlDbType.Decimal).Value = CveTipoTrabajador
|
||||
End With
|
||||
|
||||
|
||||
|
||||
@@ -858,7 +858,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateEstatusPersonal(EstatusPersonal As String, Estatus As Boolean, CveEstatusPersonal As Integer) As Boolean
|
||||
Public Function UpdateEstatusPersonal(EstatusPersonal As String, Estatus As Boolean, CveEstatusPersonal As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_RH_EstatusPersonalUpdate")
|
||||
@@ -867,6 +867,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
.Add("@EstatusPersonal", SqlDbType.VarChar).Value = EstatusPersonal
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2452,12 +2453,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpPersonalAltas(CvePersonal As Integer, fechaInicio As String, fechaFin As String, CvePeriodoFiniquito As Integer, CveMotivoBaja As Integer, esLiquidacion As Boolean, ValIndemnizacion As Boolean, ValSeparacionunica As Boolean, ValPrimadeantiguedad As Boolean, Optional Observaciones As String = "") As Boolean
|
||||
Public Function UpPersonalAltas(CvePersonal As Integer, CveUsuario As Integer, fechaInicio As String, fechaFin As String, CvePeriodoFiniquito As Integer, CveMotivoBaja As Integer, esLiquidacion As Boolean, ValIndemnizacion As Boolean, ValSeparacionunica As Boolean, ValPrimadeantiguedad As Boolean, Optional Observaciones As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_RH_PersonalAltasUp")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@fechaInicio", SqlDbType.VarChar).Value = fechaInicio
|
||||
.Add("@fechaFin", SqlDbType.VarChar).Value = fechaFin
|
||||
.Add("@CvePeriodoFiniquito", SqlDbType.Int).Value = CvePeriodoFiniquito
|
||||
@@ -2757,13 +2759,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Return Retorno
|
||||
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, CveTipoTrabajador As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
SqlDataAdapter("PA_RH_PersonalAsistenciasMasivaAddUpd2")
|
||||
SqlDataAdapter("PA_RH_PersonalAsistenciasMasivas")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveTipoTrabajador", SqlDbType.Int).Value = CveTipoTrabajador
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
@@ -7578,7 +7581,69 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#Region "TipoTrabajador"
|
||||
#Region "CRUD_TiposTrabajador"
|
||||
Public Function TiposTrabajadorGet(cveTipoTrabajador As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_TiposTrabajadorGet", CommandType.StoredProcedure)
|
||||
addParameters("@CveTipoTrabajador", SqlDbType.Int, cveTipoTrabajador)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los tipos trabajador.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function TiposTrabajadorAdd(tipoTrabajador As String, estatus As Boolean, fechaIng As DateTime, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_TiposTrabajadorAdd", CommandType.StoredProcedure)
|
||||
addParameters("@TipoTrabajador", SqlDbType.VarChar, tipoTrabajador)
|
||||
addParameters("@Estatus", SqlDbType.Bit, estatus)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el tipo trabajador.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function TiposTrabajadorUp(cveTipoTrabajador As Int32, tipoTrabajador As String, estatus As Boolean, fechaIng As DateTime, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_TiposTrabajadorUp", CommandType.StoredProcedure)
|
||||
addParameters("@CveTipoTrabajador", SqlDbType.Int, cveTipoTrabajador)
|
||||
addParameters("@TipoTrabajador", SqlDbType.VarChar, tipoTrabajador)
|
||||
addParameters("@Estatus", SqlDbType.Bit, estatus)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el tipo trabajador.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function TiposTrabajadorRemove(cveTipoTrabajador As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_TiposTrabajadorRemove", CommandType.StoredProcedure)
|
||||
addParameters("@CveTipoTrabajador", SqlDbType.Int, cveTipoTrabajador)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
retorno = RunQuery("Ocurrió un error al eliminar el TiposTrabajador.")
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el tipo trabajador.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
'Public msgsError As New StringBuilder()
|
||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
|
||||
@@ -1087,7 +1087,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked,TxtObservaciones.Text ) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked,TxtObservaciones.Text ) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
@@ -1340,7 +1340,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
|
||||
@@ -362,7 +362,7 @@ partial class Nomina_Finiquito : ClsPaginas
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
if (ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ Partial Class Nomina_FiniquitoVB
|
||||
|
||||
|
||||
Using ObjPersonal As New ClsRH()
|
||||
If ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||
If ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -139,7 +139,7 @@ Partial Class RH_CatEstatusPersonal
|
||||
Dim EstatusPersonal As String = PersonalEstatTxt.Text
|
||||
Dim Estatus As Boolean = ChkEstatus.Checked
|
||||
Dim CveEstatusPersonal As Integer = CveEstatusPerAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
|
||||
If ObjEstatusPersonal.UpdateEstatusPersonal(EstatusPersonal, Estatus, CveEstatusPersonal) Then
|
||||
If ObjEstatusPersonal.UpdateEstatusPersonal(EstatusPersonal, Estatus, CveEstatusPersonal, UsuarioActual.CveUsuario) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTEstatusPersonal") = ObjEstatusPersonal.DtResultados
|
||||
GlobalDTEstatusPersonal = ObjEstatusPersonal.DtResultados
|
||||
|
||||
Reference in New Issue
Block a user