From 95db34a9ae12aa30b28cc36b8d4cae0aa510cc95 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 29 Jul 2022 16:21:05 -0700 Subject: [PATCH 1/2] --- App_Code/ClsNominas.vb | 8 +- App_Code/ClsRH.vb | 32 +- GPS/Asistencia.rdlc | 905 +++++++++++++++++++++++++++++++++ Nomina/Nomina.aspx.cs | 67 ++- RH/ActualizacionMasiva.aspx | 70 +-- RH/ActualizacionMasiva.aspx.vb | 65 ++- RH/Asistencias.aspx | 91 ++-- RH/Asistencias.aspx.vb | 83 ++- RH/Personal.aspx.vb | 41 +- Sistemas/UsuarioDetalle.aspx | 4 +- vwd.webinfo | 10 + 11 files changed, 1260 insertions(+), 116 deletions(-) create mode 100644 GPS/Asistencia.rdlc diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index b9ce81522..10f9a0250 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1338,10 +1338,14 @@ Public Class ClsNominas SqlAdapter.Fill(Data) Retorno = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString.ToEntero Catch Ex1 As SqlException + + If Ex1.Message.Contains("Número: 2627;") Then Alert("Ya existe un Concepto de Nomina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_Nom_Conceptos_CveEmpresa_Codigo") Then + Alert("Ya existe un Concepto de Nomina con el mismo Código: " & Codigo & ".", TipoMensaje.MsgAdvertencia) Else - Me.OnError("Ocurrió un error al Guardar el Concepto de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Me.OnError("Ocurrió un error al Guardar el Concepto de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If Catch ex As Exception OnError("Ocurrió un error al Guardar el Concepto de Nomina", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) @@ -1386,6 +1390,8 @@ Public Class ClsNominas Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then Alert("Ya existe un Concepto de Nomina con el mismo nombre: " & Codigo & ".", TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_Nom_Conceptos_CveEmpresa_Codigo") Then + Alert("Ya existe un Concepto de Nomina con el mismo Código: " & Codigo & ".", TipoMensaje.MsgAdvertencia) Else Me.OnError("Ocurrió un error el Concepto de Nomina", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index b0d5a6a97..c642bf35c 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1896,7 +1896,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Function - Public Function GetPersonalMasivo(CveTurno As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveSupervisor As Integer, CveEmpresa As Integer) As Boolean + Public Function GetPersonalMasivo(CveTurno As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveSupervisor As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -1906,7 +1906,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@CveTurno", SqlDbType.Int).Value = CveTurno .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveSupervisor", SqlDbType.Int).Value = CveSupervisor + .Add("@CveSupervisor", SqlDbType.Int).Value = CveSupervisor + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -2271,6 +2272,33 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno End Function + Public Function UpdatePersonalMasivoData(CveTurno As Integer, CveCliente As Integer, CveSupervisor As Integer, CvePersonal As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + SqlDataAdapter("PA_RH_PersonalUpdateMasivoData") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTurno", SqlDbType.Int).Value = CveTurno + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveSupervisor", SqlDbType.VarChar).Value = CveSupervisor + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("El Personal no se guardó debido a que actualmente se encuentra registrado.", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + 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 UpdatePersonalMasivo(CveTurno As Integer, CveSubProyecto As Integer, CveSupervisor As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, CvePersonal As Integer, CveEmpresa As Integer) As Boolean diff --git a/GPS/Asistencia.rdlc b/GPS/Asistencia.rdlc new file mode 100644 index 000000000..e20d350f1 --- /dev/null +++ b/GPS/Asistencia.rdlc @@ -0,0 +1,905 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 74f8a171-24f1-4404-809e-ec2e098f1907 + + + + + + DataSet3 + /* Local Query */ + + + + Codigo + System.String + + + Nombre + System.String + + + AsistenciasInasistencias + System.String + + + PorcentajePago + System.Decimal + + + HorasDobles + System.Decimal + + + HorasTriples + System.Decimal + + + MotivoHoraExtra + System.String + + + + DataSet3 + C:\Users\jesus\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DataSet3.xsd + DataTable1 + + + + + + + + + + + + + + + 1.43285cm + + + 5.73362cm + + + 2.51764cm + + + 1.99729cm + + + 2.5cm + + + 2.5cm + + + 2.1825cm + + + + + 0.6cm + + + + + true + true + + + + + Código + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Personal + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Asistencias + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + % de Pago + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Horas Dobles + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Horas Triples + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Firma + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Codigo.Value + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Nombre.Value + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AsistenciasInasistencias.Value + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorcentajePago.Value + + + + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =IIf(Fields!HorasDobles.Value>0,Fields!HorasDobles.Value.ToString(),"") + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =IIf(Fields!HorasTriples.Value>0,Fields!HorasTriples.Value.ToString(),"") + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + + Gray + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 2.11349cm + 0.31432cm + 1.2cm + 18.8639cm + + + + + + true + true + + + + + Lista de asistencia del día + + + + =Parameters!Fecha.Value + + + + + + + Textbox15 + 0.57891cm + 0.31432cm + 0.9175cm + 18.8639cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.65554in +