diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 5bb136279..ce97407c7 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -2849,7 +2849,7 @@ Partial Class RH_Personal
Private Sub CarcaConceptosNomina()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then
- 'GVConceptos.DataSource = ObjPersonal.DtResultados.FiltraParametros("(CveSistema <>3 AND CveSistema <>4) OR CveSistema IS NULL")
+ GVConceptos.DataSource = ObjPersonal.DtResultados.FiltraParametros("(CveSistema <>3 AND CveSistema <>4) OR CveSistema IS NULL")
Dim frow As DataRow = ObjPersonal.DtResultados.FiltroPrimero("CveSistema =3")
If Not IsNothing(frow) Then
TxtInfoValor.Text = String.Format("{0:###,###.##}", frow("Importe"))
@@ -2883,7 +2883,7 @@ Partial Class RH_Personal
'Conceptos.DataSource = Nothing
End If
ObjPersonal.Dispose()
- 'GVConceptos.DataBind()
+ GVConceptos.DataBind()
'For Each Row As GridViewRow In GVConceptos.Rows
' Dim Ddl As DropDownList = DirectCast(GVConceptos.Rows(Row.RowIndex).FCDropDownList("DdlTipoAplicacion"), DropDownList)
@@ -2891,68 +2891,68 @@ Partial Class RH_Personal
'Next
End Sub
- 'Protected Sub GVConceptos_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVConceptos.RowDataBound
- ' If e.Row.RowType = DataControlRowType.DataRow Then
- ' e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
+ Protected Sub GVConceptos_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVConceptos.RowDataBound
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
- ' e.Row.Cells(0).Width = Unit.Pixel(50)
- ' e.Row.Cells(1).Width = Unit.Pixel(50)
- ' e.Row.Cells(3).Width = Unit.Pixel(70)
- ' e.Row.Cells(4).Width = Unit.Pixel(70)
- ' e.Row.Cells(5).Width = Unit.Pixel(160)
+ e.Row.Cells(0).Width = Unit.Pixel(50)
+ e.Row.Cells(1).Width = Unit.Pixel(50)
+ e.Row.Cells(3).Width = Unit.Pixel(70)
+ e.Row.Cells(4).Width = Unit.Pixel(70)
+ e.Row.Cells(5).Width = Unit.Pixel(160)
- ' If e.Row.DBCampo("Aplica").ToEntero() = 1 Then e.Row.FCCheckBox("ChkAplica").Checked = True
+ If e.Row.DBCampo("Aplica").ToEntero() = 1 Then e.Row.FCCheckBox("ChkAplica").Checked = True
- ' If e.Row.DBCampo("Formula") = "S" Then
- ' 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
- ' 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"))
+ If e.Row.DBCampo("Formula") = "S" Then
+ 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
+ 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"))
- ' ElseIf (e.Row.DBCampo("CveSistema").ToString() = "4") Then
- ' e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Importe fijo)", "3001"))
- ' e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Por días Labarados)", "3002"))
- ' 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
+ ElseIf (e.Row.DBCampo("CveSistema").ToString() = "4") Then
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Importe fijo)", "3001"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Por días Labarados)", "3002"))
+ 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("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
+ '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
+ End If
+ End Sub
Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs)
Dim importe As Decimal = TxtInfoValor.Text.ToDecimal()
@@ -2981,61 +2981,61 @@ Partial Class RH_Personal
End If
End Sub
- 'Protected Sub BtnGuardarConceptos_Click(sender As Object, e As System.EventArgs) Handles BtnGuardarConceptos.Click
- ' If CvePersonal > 0 Then
- ' Dim ObjPersonal As New ClsRH
- ' ObjPersonal.IniciaTransacSQL()
+ Protected Sub BtnGuardarConceptos_Click(sender As Object, e As System.EventArgs) Handles BtnGuardarConceptos.Click
+ If CvePersonal > 0 Then
+ Dim ObjPersonal As New ClsRH
+ ObjPersonal.IniciaTransacSQL()
- ' Dim OcurrioError As Boolean = False
- ' For Each Row As GridViewRow In GVConceptos.Rows
- ' If Row.FCCheckBox("ChkAplica").Checked = True Then
- ' Dim CveConcepto As Integer = Row.DataKey("CveConcepto").ToEntero()
- ' Dim Importe As Double = Row.FCTextBox("TxtImporte").Text.ToDouble
- ' Dim TipoAplicacion As Integer = Row.FCDropDownList("DdlTipoAplicacion").SelectedValue.ToEntero()
- ' Dim NoPagos As Integer = If(Row.FCTextBox("TxtNoPagos").Text.ToEntero() = 0, -1, Row.FCTextBox("TxtNoPagos").Text.ToEntero())
- ' Dim SaldoIni As Double = If(Row.FCTextBox("TxtSaldoIni").Text.ToDouble = 0, -1, Row.FCTextBox("TxtSaldoIni").Text.ToDouble)
+ Dim OcurrioError As Boolean = False
+ For Each Row As GridViewRow In GVConceptos.Rows
+ If Row.FCCheckBox("ChkAplica").Checked = True Then
+ Dim CveConcepto As Integer = Row.DataKey("CveConcepto").ToEntero()
+ Dim Importe As Double = Row.FCTextBox("TxtImporte").Text.ToDouble
+ Dim TipoAplicacion As Integer = -1 'Row.FCDropDownList("DdlTipoAplicacion").SelectedValue.ToEntero()
+ Dim NoPagos As Integer = If(Row.FCTextBox("TxtNoPagos").Text.ToEntero() = 0, -1, Row.FCTextBox("TxtNoPagos").Text.ToEntero())
+ Dim SaldoIni As Double = If(Row.FCTextBox("TxtSaldoIni").Text.ToDouble = 0, -1, Row.FCTextBox("TxtSaldoIni").Text.ToDouble)
- ' Select Case TipoAplicacion
- ' Case 1
- ' 'Saldo
- ' NoPagos = -1
- ' Case 2
- ' 'Numero de Pagos
- ' SaldoIni = -1
- ' Case 2600
- ' 'Permanente
- ' NoPagos = -1
- ' SaldoIni = -1
- ' End Select
+ Select Case TipoAplicacion
+ Case 1
+ 'Saldo
+ NoPagos = -1
+ Case 2
+ 'Numero de Pagos
+ SaldoIni = -1
+ Case 2600
+ 'Permanente
+ NoPagos = -1
+ SaldoIni = -1
+ End Select
- ' 'Insertarlo o Actualizarlo
- ' If Not ObjPersonal.AddConcepto(CvePersonal, CveConcepto, Importe, TipoAplicacion, NoPagos, SaldoIni, UsuarioActual.CveUsuario) Then
- ' OcurrioError = True
- ' ObjPersonal.RollBack()
- ' Exit For
- ' End If
- ' Else
- ' 'Borrarlo
- ' If Row.DataKey("CvePersonalConcepto") <> "" Then
- ' If Not ObjPersonal.RemoveConcepto(Row.DataKey("CvePersonalConcepto").ToEntero()) Then
- ' OcurrioError = True
- ' ObjPersonal.RollBack()
- ' Exit For
- ' End If
- ' End If
- ' End If
- ' Next
+ 'Insertarlo o Actualizarlo
+ If Not ObjPersonal.AddConcepto(CvePersonal, CveConcepto, Importe, TipoAplicacion, NoPagos, SaldoIni, UsuarioActual.CveUsuario) Then
+ OcurrioError = True
+ ObjPersonal.RollBack()
+ Exit For
+ End If
+ Else
+ 'Borrarlo
+ If Row.DataKey("CvePersonalConcepto") <> "" Then
+ If Not ObjPersonal.RemoveConcepto(Row.DataKey("CvePersonalConcepto").ToEntero()) Then
+ OcurrioError = True
+ ObjPersonal.RollBack()
+ Exit For
+ End If
+ End If
+ End If
+ Next
- ' If Not OcurrioError Then
- ' ObjPersonal.Commit()
- ' Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
- ' Else
- ' Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
- ' End If
+ If Not OcurrioError Then
+ ObjPersonal.Commit()
+ Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
+ Else
+ Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
+ End If
- ' ObjPersonal.Dispose()
- ' End If
- 'End Sub
+ ObjPersonal.Dispose()
+ End If
+ End Sub
#End Region