move llamados a bd desde clase
This commit is contained in:
@@ -790,7 +790,8 @@ Public Class ClsCGame
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddHuerta(Huerta As String, CveProveedor As Integer, CveUsuario As Integer, CveEmpresa As Integer, TipoCobro As Integer, Importe As Double, CostoXTonelada As Double) As Boolean
|
||||
Public Function AddHuerta(Huerta As String, CveProveedor As Integer, CveUsuario As Integer, CveEmpresa As Integer, TipoCobro As Integer, Importe As Double, CostoXTonelada As Double,
|
||||
NombreRegistro As String, NumeroRegistro As String, CveOrigen As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_HuertaAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -801,6 +802,9 @@ Public Class ClsCGame
|
||||
.Add("@TipoCobro", SqlDbType.Int).Value = TipoCobro
|
||||
.Add("@Importe", SqlDbType.Float).Value = Importe
|
||||
.Add("@CostoXTonelada", SqlDbType.Float).Value = CostoXTonelada
|
||||
.Add("@NombreRegistro", SqlDbType.VarChar).Value = NombreRegistro
|
||||
.Add("@NumeroRegistro", SqlDbType.VarChar).Value = NumeroRegistro
|
||||
.Add("@CveOrigen", SqlDbType.Int).Value = CveOrigen
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -811,7 +815,8 @@ Public Class ClsCGame
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateHuerta(CveHuerta As Integer, Huerta As String, CveProveedor As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer, TipoCobro As Integer, Importe As Double, CostoXTonelada As Double) As Boolean
|
||||
Public Function UpdateHuerta(CveHuerta As Integer, Huerta As String, CveProveedor As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer, TipoCobro As Integer, Importe As Double, CostoXTonelada As Double,
|
||||
NombreRegistro As String, NumeroRegistro As String, CveOrigen As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_HuertaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -824,6 +829,9 @@ Public Class ClsCGame
|
||||
.Add("@TipoCobro", SqlDbType.Int).Value = TipoCobro
|
||||
.Add("@Importe", SqlDbType.Float).Value = Importe
|
||||
.Add("@CostoXTonelada", SqlDbType.Float).Value = CostoXTonelada
|
||||
.Add("@NombreRegistro", SqlDbType.VarChar).Value = NombreRegistro
|
||||
.Add("@NumeroRegistro", SqlDbType.VarChar).Value = NumeroRegistro
|
||||
.Add("@CveOrigen", SqlDbType.Int).Value = CveOrigen
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -2702,7 +2702,8 @@ Public Class ClsGenerales
|
||||
CveActivoFijo As Integer, CveOS As Integer, CvePS As Integer, CveCompra As Integer,
|
||||
CveIE As Integer, Actual As String, Anterior As String, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, SeElimino As Integer, Descripcion As String, Tipo As String,
|
||||
Id_Clave As String, Optional IdPoliza As Integer = -1, Optional CvePromocion As Integer = -1, Optional CveUsuarioTabla As Integer = -1) As Boolean
|
||||
Id_Clave As String, Optional IdPoliza As Integer = -1, Optional CvePromocion As Integer = -1, Optional CveUsuarioTabla As Integer = -1,
|
||||
Optional CvePersonal As Integer = -1, Optional Motivo As String = "", Optional Fecha As String = "1900/01/01") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_HistorialBitacoraAdd")
|
||||
|
||||
@@ -2726,6 +2727,9 @@ Public Class ClsGenerales
|
||||
.Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
|
||||
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
|
||||
.Add("@CveUsuarioTabla", SqlDbType.Int).Value = CveUsuarioTabla
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
|
||||
|
||||
End With
|
||||
|
||||
@@ -5629,7 +5629,7 @@ Public Class ClsInventarios
|
||||
Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
|
||||
NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String,
|
||||
Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
|
||||
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False) As Boolean
|
||||
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesAdd")
|
||||
@@ -5656,6 +5656,7 @@ Public Class ClsInventarios
|
||||
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
|
||||
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -5689,7 +5690,7 @@ Public Class ClsInventarios
|
||||
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
|
||||
NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String,
|
||||
NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
|
||||
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False) As Boolean
|
||||
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5716,6 +5717,7 @@ Public Class ClsInventarios
|
||||
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
|
||||
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -609,6 +609,24 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function CalculosISRAguinaldo(fraccionII_1 As Decimal, salariomensual As Decimal, diasmes As Int32, ejercicio As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_CalculosISRAguinaldo", CommandType.StoredProcedure)
|
||||
addParameters("@FraccionII_1", SqlDbType.Money, fraccionII_1)
|
||||
addParameters("@salariomensual", SqlDbType.Money, salariomensual)
|
||||
addParameters("@Diasmes", SqlDbType.Money, diasmes)
|
||||
addParameters("@Ejercicio", SqlDbType.Int, ejercicio)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el Calculo ISR Aguinaldo.")
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function UMAFechaGet(cveempresa As Integer, fecha As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_UMAFechaGet", CommandType.StoredProcedure)
|
||||
addParameters("@cveempresa", SqlDbType.Int, cveempresa)
|
||||
addParameters("@Fecha", SqlDbType.VarChar, fecha)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el valor de la UMA.")
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function GetDispersionnomina(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure)
|
||||
@@ -2294,7 +2312,26 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function ValidaFechaFinPersonal(CvePersonal As Integer, CveEmpresa As Integer, FechaFin As String)
|
||||
Public Function AgroValidacionNomGet(cveValidacionNomina As Int32, cveEmpresa As Int32, CveUsuario As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Agro_ValidacionNomGet", CommandType.StoredProcedure)
|
||||
addParameters("@CveValidacionNomina", SqlDbType.Int, cveValidacionNomina)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, CveUsuario)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_Agro_ValidacionNomGet.")
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function ConceptosCveSistemaUp(cveConcepto As Int32, cveSistema As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_ConceptosCveSistemaUp", CommandType.StoredProcedure)
|
||||
addParameters("@CveConcepto", SqlDbType.Int, cveConcepto)
|
||||
addParameters("@CveSistema", SqlDbType.Int, cveSistema)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_Nom_ConceptosCveSistemaUp.")
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function ValidaFechaFinPersonal(CvePersonal As Integer, CveEmpresa As Integer, FechaFin As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_ValidaFechaFinPersonal")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
@@ -3568,7 +3568,7 @@ Public Class ClsRH
|
||||
End Function
|
||||
Public Function AddTurno(Turno As String, HorarioDe As String, HorarioA As String, CveUsuario As Integer, CveEmpresa As Integer, CveChecadorHorario As Integer,
|
||||
ToleranciaERetardo As Integer, ToleranciaEFalta As Integer, ToleranciaSRetardo As Integer, ToleranciaSFalta As Integer,
|
||||
Comida As Integer, ComidaDe As String, ComidaA As String) As Boolean
|
||||
Comida As Integer, ComidaDe As String, ComidaA As String, Optional DiaDescanso As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3590,6 +3590,7 @@ Public Class ClsRH
|
||||
.Add("@ToleranciaEFalta", SqlDbType.Int).Value = ToleranciaEFalta
|
||||
.Add("@ToleranciaSRetardo", SqlDbType.Int).Value = ToleranciaSRetardo
|
||||
.Add("@ToleranciaSFalta", SqlDbType.Int).Value = ToleranciaSFalta
|
||||
.Add("@DiaDescanso", SqlDbType.Int).Value = DiaDescanso
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3609,7 +3610,7 @@ Public Class ClsRH
|
||||
End Function
|
||||
Public Function UpdateTurno(Turno As String, HorarioDe As String, HorarioA As String, Estatus As Boolean, CveTurno As Integer, CveUsuario As Integer, CveChecadorHorario As Integer,
|
||||
ToleranciaERetardo As Integer, ToleranciaEFalta As Integer, ToleranciaSRetardo As Integer, ToleranciaSFalta As Integer,
|
||||
Comida As Integer, ComidaDe As String, ComidaA As String) As Boolean
|
||||
Comida As Integer, ComidaDe As String, ComidaA As String, Optional DiaDescanso As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3632,6 +3633,7 @@ Public Class ClsRH
|
||||
.Add("@ToleranciaEFalta", SqlDbType.Int).Value = ToleranciaEFalta
|
||||
.Add("@ToleranciaSRetardo", SqlDbType.Int).Value = ToleranciaSRetardo
|
||||
.Add("@ToleranciaSFalta", SqlDbType.Int).Value = ToleranciaSFalta
|
||||
.Add("@DiaDescanso", SqlDbType.Int).Value = DiaDescanso
|
||||
|
||||
|
||||
End With
|
||||
@@ -7441,6 +7443,110 @@ Public Class ClsRH
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function PersonalTurnoUp(cveTurno As Int32, cveUsuario As Int32, cveEmpresa As Int32, cvePersonal As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_PersonalTurnoUp", CommandType.StoredProcedure)
|
||||
addParameters("@CveTurno", SqlDbType.Int, cveTurno)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
retorno = RunQuery("Ocurrió un error al actualizar el turno del personal.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function SupervisorOrganigramaGet(cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_SupervisorOrganigramaGet", CommandType.StoredProcedure)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_SupervisorOrganigramaGet.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function PersonalRPUpdate(cvePersonal As Int32, cveUsuario As Int32, cveEmpresa As Int32, registroPatronal As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_PersonalRPUpdate", CommandType.StoredProcedure)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@RegistroPatronal", SqlDbType.VarChar, registroPatronal)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_PersonalRPUpdate.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function PersonalTSUpdate(cvePersonal As Int32, cveUsuario As Int32, cveEmpresa As Int32, tipodeSalario As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_PersonalTSUpdate", CommandType.StoredProcedure)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@TipodeSalario", SqlDbType.VarChar, tipodeSalario)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_PersonalTSUpdate.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function GetAsistenciaChecador(cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_GetAsistenciaChecador", CommandType.StoredProcedure)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_GetAsistenciaChecador.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function PersonalDomUp(cveEstadoDomicilio As Int32, ciudadOrigen As String, cvePersonal As Int32, cveEmpresa As Int32, cveUsuario As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_PersonalDomUp", CommandType.StoredProcedure)
|
||||
addParameters("@CveEstadoDomicilio", SqlDbType.Int, cveEstadoDomicilio)
|
||||
addParameters("@CiudadOrigen", SqlDbType.VarChar, ciudadOrigen)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_PersonalDomUp.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function PersonalAltasRemove(cvePersonalAltas As Int32, cvePersonal As Int32, cveEmpresa As Int32, cveUsuario As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_PersonalAltasRemove", CommandType.StoredProcedure)
|
||||
addParameters("@CvePersonalAltas", SqlDbType.Int, cvePersonalAltas)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_PersonalAltasRemove.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function PersonalAltasUpFechas(cvePersonalAltas As Int32, fechaInicio As String, fechaFin As String, cvePersonal As Int32, cveEmpresa As Int32, cveUsuario As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_PersonalAltasUpFechas", CommandType.StoredProcedure)
|
||||
addParameters("@CvePersonalAltas", SqlDbType.Int, cvePersonalAltas)
|
||||
addParameters("@FechaInicio", SqlDbType.VarChar, fechaInicio)
|
||||
addParameters("@FechaFin", SqlDbType.VarChar, fechaFin)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_PersonalAltasUpFechas.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function AsistenciaDetTurnoUp(cveAsistenciaDetalle As Int32, fecha As String, cveTurno As Int32, cveTurnoOLD As Int32, cvePersonal As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RH_AsistenciaDetTurnoUp", CommandType.StoredProcedure)
|
||||
addParameters("@CveAsistenciaDetalle", SqlDbType.Int, cveAsistenciaDetalle)
|
||||
addParameters("@Fecha", SqlDbType.VarChar, fecha)
|
||||
addParameters("@CveTurno", SqlDbType.Int, cveTurno)
|
||||
addParameters("@CveTurnoOLD", SqlDbType.Int, cveTurnoOLD)
|
||||
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_RH_AsistenciaDetTurnoUp.")
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function estatusPersonalUp(Fecha As DateTime, CvePersonal As Integer, CveEstatusPersonal As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional CveMotivoBaja As Integer = -1, Optional Observaciones As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
|
||||
@@ -21,17 +21,10 @@
|
||||
{
|
||||
if (!IsPostBack){
|
||||
CargaProveedor();
|
||||
CargaHuerta();
|
||||
}
|
||||
}
|
||||
protected void CargaHuerta()
|
||||
CargaHuerta();
|
||||
}
|
||||
}
|
||||
if (ObjHuer.GetHuerta(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GVHuerta.DataSource = ObjHuer.DtResultados;
|
||||
GVHuerta.DataBind();
|
||||
}
|
||||
protected void CargaHuerta()
|
||||
{
|
||||
ClsCGame ObjHuer =new ClsCGame();
|
||||
if (ObjHuer.GetHuerta(UsuarioActual.CveEmpresa))
|
||||
|
||||
@@ -207,18 +207,15 @@ Partial Class Inventarios_CatUnidades
|
||||
|
||||
If CveCamion <= 0 Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue) Then
|
||||
Alert("Unidad agregada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue) Then
|
||||
Alert("Unidad actualizada correctamente")
|
||||
Using objbase = New ClsClaseBase()
|
||||
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))
|
||||
End Using
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
|
||||
@@ -53,14 +53,12 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
LtlUma.Text = "";
|
||||
int cveempresa = 1;
|
||||
if (UsuarioActual != null) { cveempresa = UsuarioActual.CveEmpresa; }
|
||||
using (ClsClaseBaseD objbase = new ClsClaseBaseD())
|
||||
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (objbase.runQuerystr($"SELECT Valor UMA FROM [dbo].[RH_TablasValores] WHERE Tipo =1 AND CveEmpresa ={cveempresa} AND Fecha<'{DateTime.Now:yyyy/MM/dd}' ORDER BY Fecha DESC"))
|
||||
if (onom.UMAFechaGet(cveempresa, $"{DateTime.Now:yyyy/MM/dd}") && onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
if (objbase.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
LtlUma.Text = objbase.DtResultados.Rows[0]["UMA"].ToString();
|
||||
}
|
||||
LtlUma.Text = onom.DtResultados.Rows[0]["UMA"].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,7 +393,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
int CvePersonal = 0;
|
||||
int CveSubProyecto = 0;
|
||||
StringBuilder str = new StringBuilder();
|
||||
using (ClsClaseBaseD objbase = new ClsClaseBaseD())
|
||||
using (ClsNominas objbase = new ClsNominas())
|
||||
{
|
||||
|
||||
foreach (GridViewRow gvrow in GVCalcularAguinaldo.Rows)
|
||||
@@ -433,10 +431,11 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
{
|
||||
FraccionI = (aguinaldogravado / diasanio) * diasmes;
|
||||
FraccionII_1 = salariomensual + FraccionI;
|
||||
str.Clear();
|
||||
str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes, DdlEjercicios.SelectedValue);
|
||||
str.AppendFormat(" dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes, DdlEjercicios.SelectedValue);
|
||||
if (objbase.runQuerystr(str.ToString()))
|
||||
//str.Clear();
|
||||
//str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes, DdlEjercicios.SelectedValue);
|
||||
//str.AppendFormat(" dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes, DdlEjercicios.SelectedValue);
|
||||
//if (objbase.runQuerystr(str.ToString()))
|
||||
if(objbase.CalculosISRAguinaldo(FraccionII_1, salariomensual, diasmes, DdlEjercicios.SelectedValue))
|
||||
{
|
||||
DataRow drow = objbase.DtResultados.Rows[0];
|
||||
FraccionII_2 = drow["isrFraccionII_2"].ToString().ToDecimal();
|
||||
@@ -658,340 +657,3 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
class ClsClaseBaseD : IDisposable
|
||||
{
|
||||
protected SqlConnection SqlConexion;
|
||||
protected SqlDataAdapter SqlAdapter;
|
||||
protected DataTable datos;
|
||||
protected DataSet DTSet;
|
||||
public DataTable DtResultados
|
||||
{
|
||||
get
|
||||
{
|
||||
return datos;
|
||||
}
|
||||
}
|
||||
public DataSet DTSetResultados
|
||||
{
|
||||
get
|
||||
{
|
||||
return DTSet;
|
||||
}
|
||||
}
|
||||
protected bool disposedValue = false;
|
||||
protected bool EsTransaccion = false;
|
||||
public string MyCurrentError;
|
||||
// REGISTRAR CONEXIÓN
|
||||
private int CveConexion = 0;
|
||||
|
||||
public ClsClaseBaseD(ClsClaseBaseD adsObj = null, SqlTransaction sqlTransacc = null, SqlDataAdapter sqlAdapter = null)
|
||||
{
|
||||
|
||||
|
||||
if (adsObj != null && adsObj.SqlAdapter != null && adsObj.SqlAdapter.SelectCommand != null && adsObj.SqlAdapter.SelectCommand.Transaction != null)
|
||||
{
|
||||
SqlConexion = adsObj.SqlConexion;
|
||||
SqlAdapter = adsObj.SqlAdapter;
|
||||
EsTransaccion = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sqlTransacc != null)
|
||||
{
|
||||
SqlConexion = sqlTransacc.Connection;
|
||||
SqlAdapter = sqlAdapter;
|
||||
EsTransaccion = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SqlConexion = new SqlConnection();
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString;
|
||||
try
|
||||
{
|
||||
SqlConexion.Open();
|
||||
SqlAdapter = new SqlDataAdapter("", SqlConexion);
|
||||
ConexionAdd();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SqlDataAdapter(string StrSQL, CommandType TipoComando = CommandType.StoredProcedure)
|
||||
{
|
||||
if (SqlConexion.State == ConnectionState.Open)
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||
SqlAdapter.SelectCommand.CommandText = StrSQL;
|
||||
SqlAdapter.SelectCommand.CommandType = TipoComando;
|
||||
datos = new DataTable();
|
||||
DTSet = new DataSet();
|
||||
}
|
||||
}
|
||||
protected void DataAdapter(string StrSQL, CommandType TipoComando = CommandType.Text)
|
||||
{
|
||||
|
||||
// if (SqlAdapter.SelectCommand == null)
|
||||
// {
|
||||
// if ((sqlCommand != null))
|
||||
// {
|
||||
// SqlAdapter.SelectCommand = sqlCommand;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SqlAdapter.SelectCommand = new SqlCommand();
|
||||
// }
|
||||
// SqlAdapter.SelectCommand.Connection = SqlConexion;
|
||||
// }
|
||||
|
||||
if (SqlConexion.State == ConnectionState.Open)
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||
SqlAdapter.SelectCommand.CommandText = StrSQL;
|
||||
SqlAdapter.SelectCommand.CommandType = TipoComando;
|
||||
datos = new DataTable();
|
||||
DTSet = new DataSet();
|
||||
}
|
||||
}
|
||||
|
||||
private void ConexionAdd()
|
||||
{
|
||||
if (ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1")
|
||||
{
|
||||
try
|
||||
{
|
||||
SqlDataAdapter("PA_Sis_RegistrarConexion");
|
||||
{
|
||||
var withBlock = SqlAdapter.SelectCommand.Parameters;
|
||||
withBlock.Add("@Clase", SqlDbType.VarChar).Value = this.GetType().Name;
|
||||
withBlock.Add("@Modulo", SqlDbType.VarChar).Value = string.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString(), HttpContext.Current.Request.QueryString.ToString());
|
||||
withBlock.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output;
|
||||
}
|
||||
SqlAdapter.Fill(datos);
|
||||
CveConexion = SqlAdapter.SelectCommand.Parameters["@IDConexion"].Value.ToString().ToEntero();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ConexionClose()
|
||||
{
|
||||
if (CveConexion > 0 && ConfigurationManager.AppSettings["RegistraConexion"] != null && ConfigurationManager.AppSettings["RegistraConexion"].ToString() == "1")
|
||||
{
|
||||
SqlDataAdapter(string.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text);
|
||||
|
||||
try
|
||||
{
|
||||
SqlAdapter.Fill(datos);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo());
|
||||
}
|
||||
CveConexion = 0;
|
||||
}
|
||||
}
|
||||
protected void addParameters(string name, SqlDbType tipo, object valor)
|
||||
{
|
||||
if (SqlConexion.State == ConnectionState.Open)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(name, tipo).Value = valor;
|
||||
}
|
||||
|
||||
public bool runQuerystr(string Query, List<parametroQuery> Listaparametros = null, string msgError = "", bool mostrarError = true)
|
||||
{
|
||||
bool retorno = false;
|
||||
try
|
||||
{
|
||||
if (SqlConexion.State == ConnectionState.Open)
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||
SqlAdapter.SelectCommand.CommandText = Query;
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.Text;
|
||||
datos = new DataTable();
|
||||
if (Listaparametros != null)
|
||||
{
|
||||
foreach (parametroQuery pr in Listaparametros)
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||
}
|
||||
}
|
||||
|
||||
SqlAdapter.Fill(datos);
|
||||
retorno = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada";
|
||||
InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}";
|
||||
ModExtensiones.GuardaLog(InfoAdicional);
|
||||
}
|
||||
}
|
||||
catch (SqlException sqEx)
|
||||
{
|
||||
retorno = false;
|
||||
setOnError(msgError, sqEx);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
retorno = false;
|
||||
setOnError(msgError, ex);
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
public int ExecQuery(string Query, List<parametroQuery> Listaparametros = null, string msgError = "", bool mostrarError = true)
|
||||
{
|
||||
int retorno = -1;
|
||||
try
|
||||
{
|
||||
if (SqlConexion.State == ConnectionState.Open)
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Clear();
|
||||
SqlAdapter.SelectCommand.CommandText = Query;
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.Text;
|
||||
if (Listaparametros != null)
|
||||
{
|
||||
foreach (parametroQuery pr in Listaparametros)
|
||||
{
|
||||
SqlAdapter.SelectCommand.Parameters.Add(pr.ParameterName, pr.SqlDataType).Direction = pr.ParameterDirection;
|
||||
}
|
||||
}
|
||||
|
||||
retorno = SqlAdapter.SelectCommand.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
{
|
||||
string InfoAdicional = "Se intenta realizar una conexion con una conexion cerrada";
|
||||
InfoAdicional = $"{InfoAdicional}{Environment.NewLine}{msgError}{Environment.NewLine}";
|
||||
this.GuardaLog(InfoAdicional);
|
||||
}
|
||||
}
|
||||
catch (SqlException sqEx)
|
||||
{
|
||||
retorno = -1;
|
||||
setOnError(msgError, sqEx);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
retorno = -1;
|
||||
setOnError(msgError, ex);
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
|
||||
|
||||
protected bool RunQuery(string msgOnError)
|
||||
{
|
||||
bool retorno = false;
|
||||
|
||||
try
|
||||
{
|
||||
SqlAdapter.Fill(datos);
|
||||
retorno = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
retorno = false;
|
||||
|
||||
setOnError(msgOnError, ex);
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
protected bool RunQueryDS(string msgOnError)
|
||||
{
|
||||
bool retorno = false;
|
||||
|
||||
try
|
||||
{
|
||||
SqlAdapter.Fill(DTSet);
|
||||
retorno = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
retorno = false;
|
||||
|
||||
setOnError(msgOnError, ex);
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
public void setOnError(string Mensaje, Exception Exeption)
|
||||
{
|
||||
string InfoAdicional = "";
|
||||
if (SqlAdapter != null && SqlAdapter.SelectCommand != null && SqlAdapter.SelectCommand.Parameters != null)
|
||||
InfoAdicional = SqlAdapter.SelectCommand.Parameters.ParametrosInfo();
|
||||
MyCurrentError = string.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString(), "\r\n", InfoAdicional);
|
||||
this.OnError(Mensaje, Exeption, InfoAdicional);
|
||||
}
|
||||
public void IniciaTransacSQL()
|
||||
{
|
||||
SqlAdapter.SelectCommand.Transaction = SqlConexion.BeginTransaction();
|
||||
EsTransaccion = true;
|
||||
}
|
||||
|
||||
public void Commit()
|
||||
{
|
||||
SqlAdapter.SelectCommand.Transaction.Commit();
|
||||
SqlConexion.Close();
|
||||
}
|
||||
|
||||
public void RollBack()
|
||||
{
|
||||
SqlAdapter.SelectCommand.Transaction.Rollback();
|
||||
SqlConexion.Close();
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
ConexionClose();
|
||||
if ((SqlConexion != null))
|
||||
{
|
||||
if (SqlConexion.State == ConnectionState.Open)
|
||||
{
|
||||
try
|
||||
{
|
||||
if ((SqlAdapter != null))
|
||||
SqlAdapter.Dispose();
|
||||
|
||||
SqlConexion.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnError("Ocurrió un error al intentar cerrar la base de datos.", ex);
|
||||
}
|
||||
}
|
||||
SqlConexion.Dispose();
|
||||
}
|
||||
|
||||
if (datos != null)
|
||||
datos.Dispose();
|
||||
if (SqlAdapter != null)
|
||||
SqlAdapter.Dispose();
|
||||
|
||||
if (DTSet != null)
|
||||
DTSet.Dispose();
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
//public class parametroQuery
|
||||
//{
|
||||
// public parametroQuery(string parameterName, object sqlValue, SqlDbType sqlDataType = default(SqlDbType), ParameterDirection parameterDirection = default(ParameterDirection))
|
||||
// {
|
||||
// this.ParameterName = parameterName;
|
||||
// this.SqlDataType = sqlDataType;
|
||||
// this.ParameterDirection = parameterDirection;
|
||||
// this.SqlValue = sqlValue;
|
||||
// }
|
||||
|
||||
// public string ParameterName { get; set; }
|
||||
// public SqlDbType SqlDataType { get; set; }
|
||||
// public ParameterDirection ParameterDirection { get; set; }
|
||||
// public object SqlValue { get; set; }
|
||||
//}
|
||||
|
||||
@@ -423,15 +423,9 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
using (ClsClaseBase objbase = new ClsClaseBase())
|
||||
using (ClsGenerales objbase = new ClsGenerales())
|
||||
{
|
||||
/*
|
||||
|
||||
INSERT INTO Gral_HistorialBitacora(CvePersonal,CveConceptoHistorialBitacora,Descripcion,Motivo,CveUsuario,CveEmpresa,Fecha,Actual)
|
||||
SELECT CvePersonal, 384,'se ingreso asistencia manual','se ingreso asistencia manual',100,@CveEmpresa,MIN(CAST(Fecha AS DATE))
|
||||
*/
|
||||
objbase.runQuerystr(string.Format("INSERT INTO Gral_HistorialBitacora(CvePersonal,CveConceptoHistorialBitacora,Descripcion,Motivo,CveUsuario,CveEmpresa,Fecha,Actual)SELECT {0}, 384,'SE INGRESO ASISTENCIA MANUAL','SE INGRESO ASISTENCIA MANUAL',{3},{2},'{1:yyyy/MM/dd}','Asistió'",
|
||||
DdlmcPersonal.SelectedValue.ToEntero(), fechaing, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario));
|
||||
objbase.AddHistorialBitacora(384, -1, -1, -1, -1, -1, -1, -1, "Asistió", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,0, "SE INGRESO ASISTENCIA MANUAL","","",CvePersonal: DdlmcPersonal.SelectedValue.ToEntero(),Fecha: $"{fechaing:yyyy/MM/dd}" ,Motivo: "SE INGRESO ASISTENCIA MANUAL");
|
||||
|
||||
}
|
||||
Alert(string.Format("La asistencia se a agregado ({0:dd-MM-yyyy HH:mm:ss}).", fechaing), ModExtensiones.TipoMensaje.ToastInformacion);
|
||||
@@ -496,9 +490,9 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
||||
int CvePersonal = TxtCvePersonal.Text.ToEntero();
|
||||
List<RequestUpAsistenciaDetalle> registros = new List<RequestUpAsistenciaDetalle>();
|
||||
int CveTurnoNEW = DdlTurno.SelectedValue.ToEntero();
|
||||
using (ClsClaseBase objbase = new ClsClaseBase())
|
||||
using (ClsRH objbase = new ClsRH())
|
||||
{
|
||||
objbase.runQuerystr(string.Format("UPDATE RH_Personal SET CveTurno={1} WHERE CvePersonal ={0}", CvePersonal, CveTurnoNEW));
|
||||
objbase.PersonalTurnoUp(CveTurnoNEW,UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa, CvePersonal);
|
||||
|
||||
}
|
||||
foreach (GridViewRow row in GvAsistenciaUp.Rows)
|
||||
@@ -522,10 +516,9 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
||||
obj.Motivo = TxtMotivo.Text.Trim();
|
||||
if (CveTurno != CveTurnoNEW)
|
||||
{
|
||||
using (ClsClaseBase objbase = new ClsClaseBase())
|
||||
using (ClsRH objbase = new ClsRH())
|
||||
{
|
||||
objbase.runQuerystr(string.Format("UPDATE RH_PersonalAsistenciasDetalle SET CveTurno={1} WHERE CveAsistenciaDetalle ={0}", CveAsistenciaDetalle, CveTurnoNEW));
|
||||
objbase.runQuerystr(string.Format("UPDATE D SET CveTurno={1} FROM RH_PersonalAsistencias A INNER JOIN RH_PersonalAsistenciasDetalle D ON D.CveAsistencia =A.CveAsistencia AND D.CveTurno = {2} WHERE A.Fecha > '{0}' AND A.CvePersonal ={3}", Fecha, CveTurnoNEW, CveTurno, CvePersonal));
|
||||
objbase.AsistenciaDetTurnoUp(CveAsistenciaDetalle, Fecha, CveTurnoNEW, CveTurno, CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -941,7 +941,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
if (dtempleados != null)
|
||||
{
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =0 AND SumaPercepciones > 0 ") > 0) || (Estatus < 2);
|
||||
LnkCancelarNomina.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =1 AND SeTimbro=0") > 0);
|
||||
}
|
||||
UpDatos.Update();
|
||||
@@ -2335,12 +2335,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
Filesgral = TxtCargarNetos.getfiles().Archivos;
|
||||
|
||||
using (ClsClaseBase objbase = new ClsClaseBase())
|
||||
using (ClsNominas objbase = new ClsNominas())
|
||||
{
|
||||
if (objbase.runQuerystr(string.Format("UPDATE C SET C.CveSistema = C.CveSistemaOLD FROM Nom_Conceptos C WHERE CveEmpresa ={0} AND CveSistema =-2; UPDATE C SET C.CveSistemaOLD = C.CveSistema FROM Nom_Conceptos C WHERE CveConcepto ={1};UPDATE C SET C.CveSistema =-2 FROM Nom_Conceptos C WHERE CveConcepto ={1};", UsuarioActual.CveEmpresa, ddlConceptocomisionNeto.SelectedValue.ToEntero())))
|
||||
{
|
||||
objbase.ConceptosCveSistemaUp(ddlConceptocomisionNeto.SelectedValue.ToEntero(), -2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2984,15 +2983,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (drow != null)
|
||||
{
|
||||
decimal UMA = 96.22M;
|
||||
|
||||
using (ClsClaseBase objbase = new ClsClaseBase())
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (objbase.runQuerystr($"SELECT Valor UMA FROM [dbo].[RH_TablasValores] WHERE Tipo =1 AND CveEmpresa ={UsuarioActual.CveEmpresa} AND Fecha<'{DateTime.Now:yyyy/MM/dd}' ORDER BY Fecha DESC"))
|
||||
if (onom.UMAFechaGet(UsuarioActual.CveEmpresa, $"{DateTime.Now:yyyy/MM/dd}") && onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
if (objbase.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
UMA = objbase.DtResultados.Rows[0]["UMA"].ToString().ToDecimal();
|
||||
}
|
||||
UMA = onom.DtResultados.Rows[0]["UMA"].ToString().ToDecimal();
|
||||
}
|
||||
}
|
||||
TxtCCSysUMA.Text = $"{UMA:N2}";
|
||||
|
||||
@@ -103,11 +103,9 @@ Partial Class RH_ActualizacionMasiva
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSuperioresOrganigrama()
|
||||
Using objbase As New ClsClaseBase
|
||||
Dim strquery As String = String.Format("SELECT CvePersonal,NombreCompleto FROM RH_Personal WHERE CveEmpresa = {0} AND CvePersonal IN (SELECT CvePersonalPadre FROM RH_Organigrama )", UsuarioActual.CveEmpresa)
|
||||
If (objbase.runQuerystr(strquery)) Then
|
||||
Using objbase As New ClsRH()
|
||||
If (objbase.SupervisorOrganigramaGet(UsuarioActual.CveEmpresa)) Then
|
||||
DdlSupervisor.DataSource = objbase.DtResultados
|
||||
|
||||
End If
|
||||
End Using
|
||||
Dim ObjRH As New ClsRH
|
||||
|
||||
@@ -34,18 +34,14 @@ Partial Class RH_Asistencias
|
||||
' Alert("Ocurrió un error al cargar el catálogo de Jefes Inmediatos")
|
||||
'End If
|
||||
'ObjRH.Dispose()
|
||||
|
||||
Using objbase As New ClsClaseBase
|
||||
Dim strquery As String = String.Format("SELECT CvePersonal,NombreCompleto FROM RH_Personal WHERE CveEmpresa = {0} AND CvePersonal IN (SELECT CvePersonalPadre FROM RH_Organigrama )", UsuarioActual.CveEmpresa)
|
||||
If (objbase.runQuerystr(strquery)) Then
|
||||
Using objbase As New ClsRH()
|
||||
If (objbase.SupervisorOrganigramaGet(UsuarioActual.CveEmpresa)) Then
|
||||
DdlSupervisorOrganigrama.DataSource = objbase.DtResultados
|
||||
|
||||
DdlSupervisorOrganigrama.DataBind()
|
||||
End If
|
||||
End Using
|
||||
|
||||
If DdlSupervisorOrganigrama.DataSource IsNot Nothing Then
|
||||
DdlSupervisorOrganigrama.DataBind()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
Private Sub CargaClientes()
|
||||
|
||||
@@ -544,7 +544,6 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
|
||||
StringBuilder str = new StringBuilder();
|
||||
//bool rollback = false;
|
||||
using (ClsClaseBase objNomina = new ClsClaseBase())
|
||||
using (ClsRH objpersonal = new ClsRH())
|
||||
{
|
||||
|
||||
@@ -567,7 +566,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
}
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalRPUpdate {0},'{1}'", CvePersonal, RegistroPatronal));
|
||||
objpersonal.PersonalRPUpdate( CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa , RegistroPatronal);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,7 +583,6 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
|
||||
StringBuilder str = new StringBuilder();
|
||||
//bool rollback = false;
|
||||
using (ClsClaseBase objNomina = new ClsClaseBase())
|
||||
using (ClsRH objpersonal = new ClsRH())
|
||||
{
|
||||
|
||||
@@ -607,7 +605,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
}
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalTSUpdate {0},'{1}'", CvePersonal, TipodeSalario));
|
||||
objpersonal.PersonalTSUpdate(CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipodeSalario);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
<th colspan="6"></th>
|
||||
<th class="bright bleft" colspan="2">Entrada</th>
|
||||
<th class="bright bleft">Salida</th>
|
||||
<th colspan="4"></th>
|
||||
<th colspan="5"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvTurno" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Turnos" data-tableheader="#thheader"
|
||||
DataKeyNames="CveTurno,Turno,CveChecadorHorario,HorarioDe,HorarioA,Comida,ComidaDe,ComidaA,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,ChecadorHorario,ToleranciaERetardo,ToleranciaEFalta,ToleranciaEFalta2,ToleranciaSRetardo,ToleranciaSFalta">
|
||||
DataKeyNames="CveTurno,Turno,CveChecadorHorario,HorarioDe,DiaDescanso,HorarioA,Comida,ComidaDe,ComidaA,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,ChecadorHorario,ToleranciaERetardo,ToleranciaEFalta,ToleranciaEFalta2,ToleranciaSRetardo,ToleranciaSFalta">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Turno" HeaderText="Turno" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--<asp:BoundField DataField="ChecadorHorario" HeaderText="Checador Horario" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
@@ -63,6 +63,11 @@
|
||||
<asp:BoundField DataField="ToleranciaERetardo" HeaderStyle-CssClass=" bleft" HeaderText="Tolerancia" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="ToleranciaEFalta2" HeaderStyle-CssClass="bright " HeaderText="Retardo" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="ToleranciaSFalta" HeaderStyle-CssClass="bright bleft" HeaderText="Tolerancia" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Día descanso">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDiaDescansoTexto" runat="server" Text='<%# Eval("DiaDescansoTexto") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
|
||||
@@ -162,6 +167,19 @@
|
||||
<asp:TextBox ID="TxtFsalida" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtFretardo" runat="server" Text="Tolerancia salida"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright ocultar">
|
||||
<asp:DropDownList ID="ddlDiaDescanso" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" Style="width: 100%">
|
||||
<asp:ListItem Value="-1" Text="Sin Asignar" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="domingo"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="lunes"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="martes"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="miércoles"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="jueves"></asp:ListItem>
|
||||
<asp:ListItem Value="6" Text="viernes"></asp:ListItem>
|
||||
<asp:ListItem Value="7" Text="sábado"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= ddlDiaDescanso.ClientID.ToString()%>">Día de descanso:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
|
||||
@@ -42,14 +42,14 @@ Partial Class RH_CatTurno
|
||||
If ChkEstatus.Checked Then Estatus = True
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjRH.AddTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlChecadorHorario.SelectedValue.ToEntero(),
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text) Then
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text, ddlDiaDescanso.SelectedValue.ToEntero()) Then
|
||||
CargaDatos()
|
||||
CargaGlobalDTTurno()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjRH.UpdateTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, Estatus, HdnID.Value.ToEntero(), UsuarioActual.CveUsuario, DdlChecadorHorario.SelectedValue.ToEntero(),
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text) Then
|
||||
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text, ddlDiaDescanso.SelectedValue.ToEntero()) Then
|
||||
CargaDatos()
|
||||
CargaGlobalDTTurno()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -80,7 +80,7 @@ Partial Class RH_CatTurno
|
||||
chkComida.Checked = (GvRow.DataKey("Comida") = "1")
|
||||
TxtComidade.Text = GvRow.DataKey("ComidaDe")
|
||||
TxtComidaA.Text = GvRow.DataKey("ComidaA")
|
||||
|
||||
ddlDiaDescanso.SelectedValueExist(GvRow.DataKey("DiaDescanso"))
|
||||
|
||||
UpAddTurno.Update()
|
||||
|
||||
@@ -100,6 +100,7 @@ Partial Class RH_CatTurno
|
||||
TxtRetardo.Text = "15"
|
||||
TxtFretardo.Text = "30"
|
||||
TxtFsalida.Text = "15"
|
||||
ddlDiaDescanso.SelectedValueExist("-1")
|
||||
CargaDdlChecadorHorario()
|
||||
ChkEstatus.Checked = True
|
||||
UpAddTurno.Update()
|
||||
|
||||
@@ -11,12 +11,12 @@ public partial class RH_ChecadorAsistencia : System.Web.UI.Page
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
using(ClsClaseBase objbase = new ClsClaseBase())
|
||||
using(ClsRH objbase = new ClsRH())
|
||||
{
|
||||
try
|
||||
{
|
||||
Usuario user = (Usuario)Context.Session["UsuarioSIG"];
|
||||
if(objbase.runQuerystr(string.Format("EXEC PA_RH_GetAsistenciaChecador {0}", user.CveEmpresa))){
|
||||
if(objbase.GetAsistenciaChecador( user.CveEmpresa)){
|
||||
GVGetAsistenciaChecador.DataSource = objbase.DtResultados;
|
||||
GVGetAsistenciaChecador.DataBind();
|
||||
|
||||
|
||||
@@ -1968,8 +1968,8 @@ Partial Class RH_Personal
|
||||
-1, "-1",
|
||||
DdlEstatusPersonal.SelectedValue.ToEntero(), TxtFechaNacimiento.Text.ToDate,
|
||||
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
|
||||
DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtTelefonoEmergencia.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim, TxtCredencialElector.Text.Trim,
|
||||
TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
|
||||
DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtTelefonoEmergencia.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim, TxtCURP.Text.Trim, TxtCredencialElector.Text.Trim,
|
||||
TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
|
||||
DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), URL,
|
||||
DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
|
||||
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
|
||||
@@ -2116,10 +2116,8 @@ Partial Class RH_Personal
|
||||
GlobalDTCuentasDepositosPersonales(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim strquery As String = String.Format("UPDATE RH_Personal SET CveEstadoDomicilio = {2},CiudadOrigen ='{3}' WHERE CvePersonal ={1} AND CveEmpresa = {0} ",
|
||||
UsuarioActual.CveEmpresa, CvePersonal, DdlEstadosDomicilio.SelectedValue.ToEntero(), TxtCiudadOrigen.Text)
|
||||
Using objbase As New ClsClaseBase
|
||||
If (objbase.runQuerystr(strquery)) Then
|
||||
Using objbase As New ClsRH
|
||||
If (objbase.PersonalDomUp(DdlEstadosDomicilio.SelectedValue.ToEntero(), TxtCiudadOrigen.Text, CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
|
||||
End If
|
||||
End Using
|
||||
CargaDatos()
|
||||
@@ -7041,16 +7039,13 @@ Partial Class RH_Personal
|
||||
Protected Sub LnkDAltas_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
CvePersonalAltas = GvRow.DataKey("CvePersonalAltas").ToEntero()
|
||||
Dim strquery As String = String.Format("DELETE [RH_PersonalAltas] WHERE CvePersonalAltas ={0} AND [CvePersonal] ={1}", CvePersonalAltas, CvePersonal)
|
||||
Using objbase As New ClsClaseBase
|
||||
If (objbase.runQuerystr(strquery)) Then
|
||||
Using objrh As New ClsRH()
|
||||
If objrh.GetPersonalAltas(CvePersonal) Then
|
||||
GvPersonalAltas.DataSource = objrh.DtResultados
|
||||
GvPersonalAltas.DataBind()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Using
|
||||
Using objrh As New ClsRH()
|
||||
If (objrh.PersonalAltasRemove(CvePersonalAltas, CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
|
||||
If objrh.GetPersonalAltas(CvePersonal) Then
|
||||
GvPersonalAltas.DataSource = objrh.DtResultados
|
||||
GvPersonalAltas.DataBind()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
Alert("Alta eliminada")
|
||||
End If
|
||||
End Using
|
||||
@@ -7066,16 +7061,13 @@ Partial Class RH_Personal
|
||||
strfin = String.Format(",[FechaFin]='{0:yyyy-MM-dd}'", fechafin)
|
||||
|
||||
End If
|
||||
Dim strquery As String = String.Format("UPDATE [RH_PersonalAltas] SET [FechaInicio]='{2:yyyy-MM-dd}' {3} WHERE CvePersonalAltas ={0} AND [CvePersonal] ={1}", CvePersonalAltas, CvePersonal, TxtFechaInicioUA.Text.ToDateTime(), strfin)
|
||||
Using objbase As New ClsClaseBase
|
||||
If (objbase.runQuerystr(strquery)) Then
|
||||
Using objrh As New ClsRH()
|
||||
If objrh.GetPersonalAltas(CvePersonal) Then
|
||||
GvPersonalAltas.DataSource = objrh.DtResultados
|
||||
GvPersonalAltas.DataBind()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Using
|
||||
Using objrh As New ClsRH()
|
||||
If (objrh.PersonalAltasUpFechas(CvePersonalAltas, TxtFechaInicioUA.Text.ToDateTime().ToString("yyyy-MM-dd"), strfin, CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
|
||||
If objrh.GetPersonalAltas(CvePersonal) Then
|
||||
GvPersonalAltas.DataSource = objrh.DtResultados
|
||||
GvPersonalAltas.DataBind()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
Alert("Alta actualizada")
|
||||
End If
|
||||
End Using
|
||||
@@ -7535,8 +7527,8 @@ Partial Class RH_Personal
|
||||
Dim vacacionesyprima As String = ""
|
||||
Dim Utilidades As String = ""
|
||||
Dim strquery As String = String.Format("EXEC PA_Agro_ValidacionNomGet @CveValidacionNomina=-1,@CveEmpresa ={0} ", UsuarioActual.CveEmpresa)
|
||||
Using objbase As New ClsClaseBase
|
||||
If (objbase.runQuerystr(strquery)) Then
|
||||
Using objbase As New ClsNominas()
|
||||
If (objbase.AgroValidacionNomGet(-1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
|
||||
Dim dbrow As DataRow
|
||||
dbrow = objbase.DtResultados.FiltroPrimero("CveValidacionNomina =4")
|
||||
If Not IsNothing(dbrow) Then
|
||||
|
||||
@@ -493,7 +493,7 @@ Public Class WSGPSApp
|
||||
}
|
||||
Dim JsonParams = Decripta(p)
|
||||
Dim Ent = JsonConvert.DeserializeAnonymousType(JsonParams, Estructura)
|
||||
If ObjGPS.DispositivoAdd(Ent.TipoDispostivo, Ent.NumTelefono, Ent.CveModelo, Ent.CveProveedorComunicacionCuenta, Ent.CveCliente, Ent.IMEI, Ent.Serie, 1, Ent.SerieVehiculo, "", Ent.NombreVehiculo, Ent.NombreVehiculo, Ent.DevID, 0, "", Ent.Anio, "", "", False, 100D, "", 0D, "", "", 100) Then
|
||||
If ObjGPS.DispositivoAdd(Ent.TipoDispostivo, Ent.NumTelefono, Ent.CveModelo, Ent.CveProveedorComunicacionCuenta, Ent.CveCliente, Ent.IMEI, Ent.Serie, 1, Ent.SerieVehiculo, "", Ent.NombreVehiculo, Ent.NombreVehiculo, Ent.DevID, 0, "", Ent.Anio, "", "", False, 100D, "", 0D, "", "", 100, "") Then
|
||||
Retorno = ObjGPS.CveDispositivo
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -531,11 +531,11 @@ Public Class WSGPSApp
|
||||
Dim Ent = JsonConvert.DeserializeAnonymousType(JsonParams, Estructura)
|
||||
|
||||
If Ent.CveDispositivo > 0 Then
|
||||
If ObjGPS.DispositivosUpdate(Ent.TipoDispostivo, Ent.NumTelefono, Ent.CveDispositivo, Ent.CveModelo, Ent.CveProveedorComunicacionCuenta, Ent.CveCliente, Ent.IMEI, Ent.Serie, 1, Ent.SerieVehiculo, "", Ent.NombreVehiculo, Ent.NombreVehiculo, Ent.DevID, 0, "", Ent.Anio, "", "", False, 100D, "", 0D, "", "", 100) Then
|
||||
If ObjGPS.DispositivosUpdate(Ent.TipoDispostivo, Ent.NumTelefono, Ent.CveDispositivo, Ent.CveModelo, Ent.CveProveedorComunicacionCuenta, Ent.CveCliente, Ent.IMEI, Ent.Serie, 1, Ent.SerieVehiculo, "", Ent.NombreVehiculo, Ent.NombreVehiculo, Ent.DevID, 0, "", Ent.Anio, "", "", False, 100D, "", 0D, "", "", 100, "") Then
|
||||
Retorno = Ent.CveDispositivo
|
||||
End If
|
||||
Else
|
||||
If ObjGPS.DispositivoAdd(Ent.TipoDispostivo, Ent.NumTelefono, Ent.CveModelo, Ent.CveProveedorComunicacionCuenta, Ent.CveCliente, Ent.IMEI, Ent.Serie, 1, Ent.SerieVehiculo, "", Ent.NombreVehiculo, Ent.NombreVehiculo, Ent.DevID, 0, "", Ent.Anio, "", "", False, 100D, "", 0D, "", "", 100) Then
|
||||
If ObjGPS.DispositivoAdd(Ent.TipoDispostivo, Ent.NumTelefono, Ent.CveModelo, Ent.CveProveedorComunicacionCuenta, Ent.CveCliente, Ent.IMEI, Ent.Serie, 1, Ent.SerieVehiculo, "", Ent.NombreVehiculo, Ent.NombreVehiculo, Ent.DevID, 0, "", Ent.Anio, "", "", False, 100D, "", 0D, "", "", 100, "") Then
|
||||
Retorno = ObjGPS.CveDispositivo
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user