This commit is contained in:
@@ -1597,7 +1597,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="portlet light bordered xspadding" id="porletconceptos">
|
||||
<%--<div class="portlet light bordered xspadding" id="porletconceptos">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-bookmark font-green"></i>
|
||||
@@ -1660,15 +1660,7 @@
|
||||
<tr>
|
||||
<td width="95px">
|
||||
<asp:DropDownList ID="DdlTipoAplicacion" OnSelectedIndexChanged="DdlTipoAplicacion_SelectedIndexChanged" AutoPostBack="true" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Width="100%">
|
||||
<%-- se movio a codigo
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1" ></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No. Pagos" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Permanente" Value="2600"></asp:ListItem>
|
||||
<asp:ListItem Text="Infonavit(Movto Permanente)" Value="5000"></asp:ListItem>
|
||||
<asp:ListItem Text="Infonavit(Porcentaje)" Value="5001"></asp:ListItem>
|
||||
<asp:ListItem Text="Infonavit(Factor Descuento)" Value="5002"></asp:ListItem>
|
||||
<asp:ListItem Text="Infonavit(Cuota Fija)" Value="5003"></asp:ListItem>--%>
|
||||
|
||||
</asp:DropDownList></td>
|
||||
<td width="65px">
|
||||
<asp:Literal ID="LtlNoPago" runat="server" Text='<%# If(IsNumeric(Eval("NoPago")), Eval("NoPago").ToString + "/", "")%>' Visible="false"></asp:Literal>
|
||||
@@ -1690,7 +1682,7 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="portlet light bordered xspadding" id="porletInfonavit">
|
||||
<div class="portlet-title">
|
||||
|
||||
@@ -914,13 +914,7 @@ Partial Class RH_Personal
|
||||
BtnEliminar.Visible = False
|
||||
CarcaConceptosNomina()
|
||||
CargaFonacot()
|
||||
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
|
||||
@@ -2700,7 +2694,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"))
|
||||
@@ -2731,79 +2725,79 @@ Partial Class RH_Personal
|
||||
' ChkFonacot.Checked = frow("estatus").ToString().ToUpper().Contiene("1", "TRUE")
|
||||
'End If
|
||||
Else
|
||||
GVConceptos.DataSource = Nothing
|
||||
'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)
|
||||
DdlTipoAplicacion_SelectedIndexChanged(Ddl, Nothing)
|
||||
Next
|
||||
'For Each Row As GridViewRow In GVConceptos.Rows
|
||||
' Dim Ddl As DropDownList = DirectCast(GVConceptos.Rows(Row.RowIndex).FCDropDownList("DdlTipoAplicacion"), DropDownList)
|
||||
' DdlTipoAplicacion_SelectedIndexChanged(Ddl, Nothing)
|
||||
'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()
|
||||
@@ -2831,87 +2825,64 @@ Partial Class RH_Personal
|
||||
CarcaConceptosNomina()
|
||||
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()
|
||||
|
||||
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)
|
||||
'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()
|
||||
|
||||
Select Case TipoAplicacion
|
||||
Case 1
|
||||
'Saldo
|
||||
NoPagos = -1
|
||||
Case 2
|
||||
'Numero de Pagos
|
||||
SaldoIni = -1
|
||||
Case 2600
|
||||
'Permanente
|
||||
NoPagos = -1
|
||||
SaldoIni = -1
|
||||
End Select
|
||||
' 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)
|
||||
|
||||
'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
|
||||
' Select Case TipoAplicacion
|
||||
' Case 1
|
||||
' 'Saldo
|
||||
' NoPagos = -1
|
||||
' Case 2
|
||||
' 'Numero de Pagos
|
||||
' SaldoIni = -1
|
||||
' Case 2600
|
||||
' 'Permanente
|
||||
' NoPagos = -1
|
||||
' SaldoIni = -1
|
||||
' End Select
|
||||
|
||||
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
|
||||
' '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
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
' 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
|
||||
#End Region
|
||||
|
||||
Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim Ddl As DropDownList = DirectCast(sender, DropDownList)
|
||||
|
||||
Dim gvr As GridViewRow = DirectCast(Ddl.NamingContainer, GridViewRow)
|
||||
|
||||
Select Case Ddl.SelectedValue.ToEntero()
|
||||
Case 1
|
||||
'Descontar hasta pagar el saldo prestado
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtSaldoIni").Visible = True
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtNoPagos").Visible = False
|
||||
Case 2
|
||||
'Descontar el numero de pagos
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtSaldoIni").Visible = False
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtNoPagos").Visible = True
|
||||
Case 2600
|
||||
'Permanente
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtSaldoIni").Visible = False
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtNoPagos").Visible = False
|
||||
Case -1
|
||||
'Seleccione
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtSaldoIni").Visible = False
|
||||
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtNoPagos").Visible = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlEstatusPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstatusPersonal.SelectedIndexChanged
|
||||
|
||||
|
||||
Reference in New Issue
Block a user