This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-10-11 17:20:17 -07:00
parent 762781fea4
commit 95c8551414
12 changed files with 5036 additions and 4385 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -620,139 +620,143 @@ Partial Class RH_Personal
Const wdCharacter As Integer = 1
'Configuración
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
ViewState("Orden") = ""
ViewState("Orden1") = ""
Session("FileUpload") = ""
ViewState("Archivo") = ""
DTConsumos = Nothing
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
TabGES.Visible = True
End If
SetValues()
'SetPermisos()
CargaEscolaridad()
CargaEstadoCivil()
CargaDepartamento()
CargaPuestos()
CargaEstatusPersonal()
CargaGenero()
CargaMotivoBaja()
CargaRuta()
CargaTiposContrato()
CargaTipoPeriodo()
CargaTurno()
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
'CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
CargaTipoRegimen()
CargaRiesgoPuesto()
CargaBancos()
CargaSubProyectosZona()
CargaEstados(1)
CargaMonedas()
CargaSuperioresOrganigrama()
CargaUsuariosNomina()
CargaComboUniformes()
CargaPermisos()
CargaCombosBuzon()
CargaPermisosReemplazos()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
'TabLicencias.Visible = True
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
'ImgImprimir.Visible = True
ImgImprimirExpediente.Visible = True
End If
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
GVAsistencia.Columns(10).Visible = True
End If
'Fin Permisos
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
CargaViaticosPersonal()
divBitacora.Visible = True
CargaGvBitacora()
Else
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CvePersonal") = -1
BtnEliminar.Visible = False
CarcaConceptosNomina()
For Each Gvr As GridViewRow In GVConceptos.Rows
If CBool(Gvr.DataKey("Obligatorio")) Then
Gvr.FCCheckBox("ChkAplica").Checked = True
Else
Gvr.Visible = False
End If
Next
'Inicia Permisos
'Fin Permisos
End If
CargaCuentasBancarias()
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
CrearEstructuraFamiliares()
CargaFamiliares()
LIFamiliaresAcciones.Visible = True
DivFamiliares.Visible = True
DivPadres.Visible = False
If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
pnlSalarioIMSS.Visible = False
End If
ViewState("Orden") = ""
ViewState("Orden1") = ""
Session("FileUpload") = ""
ViewState("Archivo") = ""
DTConsumos = Nothing
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
TabGES.Visible = True
End If
SetValues()
'SetPermisos()
CargaEscolaridad()
CargaEstadoCivil()
CargaDepartamento()
CargaPuestos()
CargaEstatusPersonal()
CargaGenero()
CargaMotivoBaja()
CargaRuta()
CargaTiposContrato()
CargaTipoPeriodo()
CargaTurno()
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
'CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
CargaTipoRegimen()
CargaRiesgoPuesto()
CargaBancos()
CargaSubProyectosZona()
CargaEstados(1)
CargaMonedas()
CargaSuperioresOrganigrama()
CargaUsuariosNomina()
CargaComboUniformes()
CargaPermisos()
CargaCombosBuzon()
CargaPermisosReemplazos()
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
'TabLicencias.Visible = True
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta de Personal:"
If UsuarioActual.CveRol = 1 Then
'ImgImprimir.Visible = True
ImgImprimirExpediente.Visible = True
End If
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
GVAsistencia.Columns(10).Visible = True
End If
'Fin Permisos
HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
CargaViaticosPersonal()
divBitacora.Visible = True
CargaGvBitacora()
Else
'Configuración de Modalidad Insert
ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CvePersonal") = -1
BtnEliminar.Visible = False
CarcaConceptosNomina()
For Each Gvr As GridViewRow In GVConceptos.Rows
If CBool(Gvr.DataKey("Obligatorio")) Then
Gvr.FCCheckBox("ChkAplica").Checked = True
Else
Gvr.Visible = False
End If
Next
'Inicia Permisos
'Fin Permisos
End If
CargaCuentasBancarias()
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
CrearEstructuraFamiliares()
CargaFamiliares()
LIFamiliaresAcciones.Visible = True
DivFamiliares.Visible = True
DivPadres.Visible = False
End If
'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
' HplAbonarMasivo.Visible = True
' GvGxC.Columns(7).Visible = True
'End If
'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
' HplAbonarMasivo.Visible = True
' GvGxC.Columns(7).Visible = True
'End If
If Not CvePersonal > 0 Then
DivSuperiorInmediato.Visible = False
End If
'09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
If DTConsumos IsNot Nothing Then
If DTConsumos.Rows.Count > 0 Then
UpDescargaConsumos.Visible = True
End If
End If
CargaLicencias()
End If
AgregarEventosAsincronosGvVacaciones()
If Not CvePersonal > 0 Then
DivSuperiorInmediato.Visible = False
End If
'09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
If DTConsumos IsNot Nothing Then
If DTConsumos.Rows.Count > 0 Then
UpDescargaConsumos.Visible = True
End If
End If
CargaLicencias()
End If
AgregarEventosAsincronosGvVacaciones()
End Sub
Private Sub CargaCuentasContables()
@@ -1089,22 +1093,9 @@ Partial Class RH_Personal
End Sub
Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(120)
e.Row.Cells(1).Width = Unit.Pixel(180)
e.Row.Cells(2).Width = Unit.Pixel(110)
e.Row.Cells(3).Width = Unit.Pixel(110)
e.Row.Cells(4).Width = Unit.Pixel(70)
e.Row.Cells(5).Width = Unit.Pixel(50)
e.Row.Cells(6).Width = Unit.Pixel(56)
e.Row.Cells(7).Width = Unit.Pixel(56)
e.Row.Cells(8).Width = Unit.Pixel(110)
e.Row.Cells(9).Width = Unit.Pixel(90)
e.Row.Cells(10).Width = Unit.Pixel(60)
End If
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
@@ -1441,6 +1432,9 @@ Partial Class RH_Personal
End If
End If
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
TxtSalarioCotizado.Text = TxtSDI.Text
End If
If CvePersonal = -1 Then
URL = ""
@@ -2183,32 +2177,46 @@ Partial Class RH_Personal
e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(3).Text = "Calculado"
e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(4).Text = "Permanente"
Else
If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValue = "2600"
Else
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValue = e.Row.DBCampo("TipoAplicacion")
End If
Dim TipoAplicacion As String = e.Row.DBCampo("TipoAplicacion").ToString()
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Clear()
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Seleccione", "-1"))
If (e.Row.DBCampo("CveSistema").ToString() = "3") Then
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Movto Permanente)", "5000"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Porcentaje)", "5001"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Factor Descuento)", "5002"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Cuota Fija)", "5003"))
Else
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Saldo", "1"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("No. Pagos", "2"))
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Permanente", "2600"))
End If
If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
TipoAplicacion = "2600"
End If
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
End If
'If e.Row.DBCampo("TipoCalculo") = "False" Then
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
' e.Row.FCTextBox("TxtSaldoIni").Visible = True
' Case 2
' 'Numero de Pagos
' e.Row.FCLiteral("LtlNoPago").Visible = True
' e.Row.FCTextBox("TxtNoPagos").Visible = True
' Case 2600
' 'Permanente
' End Select
'End If
End If
'If e.Row.DBCampo("TipoCalculo") = "False" Then
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
' e.Row.FCTextBox("TxtSaldoIni").Visible = True
' Case 2
' 'Numero de Pagos
' e.Row.FCLiteral("LtlNoPago").Visible = True
' e.Row.FCTextBox("TxtNoPagos").Visible = True
' Case 2600
' 'Permanente
' End Select
'End If
End If
End Sub
Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs)
@@ -5874,4 +5882,11 @@ Partial Class RH_Personal
#End Region
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
If ddl.SelectedItem.Text = "Retardo" Then
gvrow.FCTextBox("TxtPorPago").Text = "87.5"
End If
End Sub
End Class