This commit is contained in:
@@ -24,14 +24,6 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property DTEmpleados As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DTEmpleados"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTEmpleados") = value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property DTUsuarios As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DTUsuarios"), DataTable)
|
||||
@@ -270,7 +262,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
column += 1
|
||||
libro.Cell(Fila, column).Value = "SD IMSS"
|
||||
column += 1
|
||||
DTEmpleados = New DataTable()
|
||||
Dim DTEmpleados As New DataTable()
|
||||
|
||||
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||
@@ -283,9 +275,9 @@ Partial Class RH_ActualizacionMasiva
|
||||
column = 1
|
||||
Fila = Fila + 1
|
||||
|
||||
libro.Cell(Fila, column).Value = dro("Codigo")
|
||||
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Codigo"))
|
||||
column += 1
|
||||
libro.Cell(Fila, column).Value = dro("Nombre")
|
||||
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Nombre"))
|
||||
column += 1
|
||||
libro.Column(column).Width = 35
|
||||
libro.Cell(Fila, column).Value = dro("SalarioDiario")
|
||||
@@ -322,7 +314,15 @@ Partial Class RH_ActualizacionMasiva
|
||||
Dim continuar As Boolean = Filesgral.Count > 0
|
||||
Dim stringError As String = ""
|
||||
Dim fileItem As Archivo = If(continuar, Filesgral(0), Nothing)
|
||||
|
||||
Dim DTEmpleados As New DataTable()
|
||||
Using ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetPersonalMasivo(-1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DTEmpleados = ObjPersonal.DtResultados
|
||||
Else
|
||||
continuar = False
|
||||
stringError = "Ocurrio un Error al procesar el excel "
|
||||
End If
|
||||
End Using
|
||||
If continuar Then
|
||||
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
||||
|
||||
@@ -348,7 +348,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
If continuar Then
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Dim contador As Integer = 0
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
For Each Row As DataRow In DTEXcel.Rows
|
||||
If Row("Codigo").ToString() <> "" Then
|
||||
@@ -357,10 +357,9 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero()
|
||||
If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal()) Then
|
||||
|
||||
contador = contador + 1
|
||||
Else
|
||||
OcurrioError = True
|
||||
ObjPersonal.RollBack()
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
@@ -369,12 +368,16 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
Next
|
||||
If Not OcurrioError Then
|
||||
'ObjPersonal.Commit()
|
||||
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
ObjPersonal.Commit()
|
||||
Alert(String.Format("La información se guardó correctamente.<br/> se registraron {0} empleados", contador), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjPersonal.RollBack()
|
||||
Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Alert(stringError, TipoMensaje.MsgError)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
} else {
|
||||
let contenedor = document.getElementById('chart_div');
|
||||
contenedor.innerHTML = '';
|
||||
console.log('vacio')
|
||||
}
|
||||
},
|
||||
failure: function (r) {
|
||||
|
||||
@@ -52,9 +52,9 @@ Partial Class RH_Organigrama
|
||||
If Not IsPostBack Then
|
||||
txtNivel.Text = ""
|
||||
DdlSupervisorOrganigrama.SelectedIndex = 0
|
||||
Dim viewFlag As Integer = CveCabecera
|
||||
CargaSuperioresOrganigrama()
|
||||
End If
|
||||
Dim viewFlag As Integer = CveCabecera
|
||||
CargaSuperioresOrganigrama()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user