This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-08-11 08:15:47 -07:00
parent 086026d9ca
commit 95ee5f11b6
8 changed files with 182 additions and 84 deletions

View File

@@ -939,7 +939,16 @@
<asp:CompareValidator ID="CVFechaIngreso" runat="server" ControlToValidate="TxtFechaIngreso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaIngreso''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarAddS"></asp:CompareValidator>
</div>
</div>
<div class="col-md-3" style="display: none;">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiario" Enabled="false" Text="Salario Diario (SDD):"></asp:Label>
<%--<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
<i></i>
</div>
</div>
<div class="col-md-5" style="display: none;">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCodigo" runat="server" MaxLength="12" Text="-1"></asp:TextBox>
<asp:Label AssociatedControlID="TxtCodigo" runat="server" Text="Código:"></asp:Label>
@@ -1098,7 +1107,7 @@
<div class="modal-footer">
<asp:LinkButton ID="LnkGuardar" OnClick="LnkGuardar_Click" CssClass="btn btn-primary" ValidationGroup="GrpGuardarAddS" runat="server">Agregar</asp:LinkButton>
<asp:Button ID="ClickOnHideModal" ClientIDMode="Static" OnClick="ClickOnHideModal_Click" CssClass="hidden" runat="server" Text="Button" />
<button type="button" class="btn btn-default" data-dismiss="modal">Terminar</button>
</div>
</div>

View File

@@ -1121,13 +1121,14 @@ Partial Class RH_CatPersonal
Dim isSindicalizado As Boolean = (DDlSindicalizado.SelectedValue = "1")
Dim CvePuesto As Integer = DdlPuestoAdd.SelectedValue.ToEntero()
Dim CveSATRiesgoPuesto As Integer = DdlRiesgoPuesto.SelectedValue.ToEntero()
Dim SalarioDiario As Decimal = TxtSalarioDiario.Text.ToDecimal()
Dim continuar As Boolean = False
Dim CvePersonal As Integer = 0
Using ObjPersonal As New ClsRH()
If ObjPersonal.AddPersonal("-1", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, "", TxtFechaIngreso.Text.ToDate,
DdlTipoPeriodoAdd.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, 0,
0, 0, 0, 0, 15, 25, DdlMetodoPagoAdd.SelectedValue.ToEntero, TxtFechaIngreso.Text.Trim.ToDate, "-1",
DdlTipoPeriodoAdd.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, True, SalarioDiario,
SalarioDiario, 0, 0, 0, 15, 25, DdlMetodoPagoAdd.SelectedValue.ToEntero, TxtFechaIngreso.Text.Trim.ToDate, "-1",
DdlTipoContratoAdd.SelectedValue.ToEntero, "",
DdlTurno.SelectedValue.ToEntero, CvePuesto,
DdlDepartamentoAdd.SelectedValue.ToEntero,

View File

@@ -645,22 +645,22 @@
</div>
<div class="portlet-body form">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList Width="100%" ID="DdlEstatusPersonal" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:DropDownList Width="100%" ID="DdlEstatusPersonal" Enabled="false" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlEstatusPersonal.ClientID.ToString()%>">Estatus: </label>
<asp:RequiredFieldValidator ID="RFVEstatusPersonal" runat="server" ControlToValidate="DdlEstatusPersonal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''EstatusPersonal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<%-- <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList Width="100%" ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlMotivoBaja.ClientID.ToString()%>">Motivo de Baja: </label>
<i></i>
</div>
</div>--%>
<div runat="server" id="DivFechaActivo" visible="true" class="form-group form-md-line-input input-iconright">
<%-- <div runat="server" id="DivFechaActivo" visible="true" class="form-group form-md-line-input input-iconright">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
<asp:TextBox ID="TxtFechaActivo" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
@@ -677,9 +677,9 @@
<i></i>
</div>
</div>--%>
<div runat="server" id="DivFechaBaja" visible="true" class="form-group form-md-line-input input-iconright">
<%-- <div runat="server" id="DivFechaBaja" visible="true" class="form-group form-md-line-input input-iconright">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
@@ -696,9 +696,9 @@
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i>
</div>
</div>--%>
<div runat="server" id="DivFechaReingreso" visible="true" class="form-group form-md-line-input input-iconright">
<%-- <div runat="server" id="DivFechaReingreso" visible="true" class="form-group form-md-line-input input-iconright">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
<asp:TextBox ID="TxtFechaReingreso" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
@@ -715,7 +715,7 @@
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaReingreso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Reingreso''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i>
</div>
</div>--%>
<div>
@@ -4813,7 +4813,7 @@
<div style=" width: 200px;
display: inline-block;">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtFechamodSalario" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtFechamodSalario" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtFechamodSalario">Fecha:</asp:Label>
<ajax:MaskedEditExtender ID="MEEFechaModSalario" runat="server" TargetControlID="TxtFechamodSalario" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaModSalario" TargetControlID="TxtFechamodSalario" PopupButtonID="LnkFechaModSalario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>

View File

@@ -1075,8 +1075,8 @@ Partial Class RH_Personal
End Sub
Private Sub CargaMotivoBaja()
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlMotivoBaja.DataBind()
'DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
'DdlMotivoBaja.DataBind()
End Sub
Private Sub CargaEstatusPersonal()
@@ -1524,14 +1524,13 @@ Partial Class RH_Personal
DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString()
DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString()
DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
'DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
TxtFechaBaja.Text = If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)
If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
TxtFechaActivo.Text = If(drow("FechaActivo").ToString().Length > 0, drow("FechaActivo").ToString().ToDate.ToString("dd/MM/yyyy"), drow("FechaIng").ToString().ToDate.ToString("dd/MM/yyyy"))
TxtFechaReingreso.Text = If(drow("FechaReingreso").ToString().Length > 0, drow("FechaReingreso").ToString().ToDate.ToString("dd/MM/yyyy"), "")
End If
'If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
' TxtFechaActivo.Text = If(drow("FechaActivo").ToString().Length > 0, drow("FechaActivo").ToString().ToDate.ToString("dd/MM/yyyy"), drow("FechaIng").ToString().ToDate.ToString("dd/MM/yyyy"))
' TxtFechaReingreso.Text = If(drow("FechaReingreso").ToString().Length > 0, drow("FechaReingreso").ToString().ToDate.ToString("dd/MM/yyyy"), "")
'End If
DdlEstatusPersonal.SelectedValue = ObjPersonal.CveEstatusPersonal.ToString()
@@ -1713,19 +1712,18 @@ Partial Class RH_Personal
Dim Mensaje = ""
Dim Accion = ""
Dim FechaBaja As Date = MinFecha
Dim FechaActivo As Date = MinFecha
Dim FechaReingreso As Date = MinFecha
'Dim FechaBaja As Date = MinFecha
'Dim FechaActivo As Date = MinFecha
'Dim FechaReingreso As Date = MinFecha
If DdlEstatusPersonal.SelectedValue.ToEntero <> CvePersonalEstatusInicial Then
If DdlEstatusPersonal.SelectedValue.ToEntero = 1 Then
FechaActivo = TxtFechaActivo.Text.ToDate
ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 2 Then
FechaBaja = TxtFechaBaja.Text.ToDate
ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 5 Then
FechaReingreso = TxtFechaReingreso.Text.ToDate
End If
End If
'If DdlEstatusPersonal.SelectedValue.ToEntero <> CvePersonalEstatusInicial Then
' If DdlEstatusPersonal.SelectedValue.ToEntero = 1 Then
' FechaActivo = TxtFechaActivo.Text.ToDate
' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 2 Then
' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 5 Then
' FechaReingreso = TxtFechaReingreso.Text.ToDate
' End If
'End If
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
TxtSalarioCotizado.Text = TxtSDI.Text
@@ -1745,7 +1743,7 @@ Partial Class RH_Personal
DdlEscolaridad.SelectedValue.ToEntero,
DdlEstadoCivil.SelectedValue.ToEntero,
DdlGenero.SelectedValue.ToEntero,
DdlMotivoBaja.SelectedValue.ToEntero, If(DdlEstatusPersonal.SelectedValue = "2", TxtFechaBaja.Text.Trim, "-1"),
-1, "-1",
DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
@@ -1816,7 +1814,7 @@ Partial Class RH_Personal
DdlEscolaridad.SelectedValue.ToEntero,
DdlEstadoCivil.SelectedValue.ToEntero,
DdlGenero.SelectedValue.ToEntero,
DdlMotivoBaja.SelectedValue.ToEntero, If(DdlEstatusPersonal.SelectedValue = "2", TxtFechaBaja.Text.Trim, "-1"),
-1, "-1",
DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
@@ -1826,7 +1824,7 @@ Partial Class RH_Personal
URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then
CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then
'Funsion usa RH Familiares
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
@@ -2652,16 +2650,18 @@ Partial Class RH_Personal
Private Sub MostrarOcultarFechasEstatus()
'DivFechaReingreso.Visible = False
'DivFechaActivo.Visible = False
If DdlEstatusPersonal.SelectedValue.ToEntero.Contiene(1, 2, 5) Then
DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 1, True, False)
DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 2, True, False)
DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 5, True, False)
Else
DivFechaActivo.Visible = False
DivFechaBaja.Visible = False
DivFechaReingreso.Visible = False
End If
'If DdlEstatusPersonal.SelectedValue.ToEntero.Contiene(1, 2, 5) Then
' DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 1, True, False)
' 'DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 2, True, False)
' 'DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 5, True, False)
'Else
' DivFechaActivo.Visible = False
' 'DivFechaBaja.Visible = False
' DivFechaReingreso.Visible = False
'End If
End Sub
@@ -3396,7 +3396,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("Proyecto", DdlProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("SubProyecto", DdlSubProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("Estatus", If(DdlEstatusPersonal.SelectedValue = "-1", "", DdlEstatusPersonal.SelectedItem.Text)))
params.Add(New ReportParameter("MotivoBaja", If(DdlMotivoBaja.SelectedValue = "-1", "", DdlMotivoBaja.SelectedItem.Text)))
params.Add(New ReportParameter("MotivoBaja", ""))
params.Add(New ReportParameter("FechaInicio", ObjPersonal.FechaIng.ToShortDateString))
params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)))
params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text))
@@ -3490,7 +3490,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("Proyecto", DdlProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("SubProyecto", DdlSubProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("Estatus", If(DdlEstatusPersonal.SelectedValue = "-1", "", DdlEstatusPersonal.SelectedItem.Text)))
params.Add(New ReportParameter("MotivoBaja", If(DdlMotivoBaja.SelectedValue = "-1", "", DdlMotivoBaja.SelectedItem.Text)))
params.Add(New ReportParameter("MotivoBaja", ""))
params.Add(New ReportParameter("FechaInicio", ObjPersonal.FechaIng.ToShortDateString))
params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)))
params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text))