This commit is contained in:
Antonio Gonzalez
2020-08-18 17:20:02 -07:00
5 changed files with 213 additions and 193 deletions

View File

@@ -277,9 +277,12 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPSModal" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="PSCodigo" DataValueField="CvePS" Width="240px" CausesValidation="true"></asp:DropDownList> <label for="<%= DdlPSModal.ClientID.ToString()%>"><span style="color:#F3565D;">* </span>Producto/Servicios:</label>
<asp:RequiredFieldValidator ID="RFVPS" runat="server" ControlToValidate="DdlPSModal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto / Servicio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpDefinir"></asp:RequiredFieldValidator> <ADS:Dropdownlost runat="server" ID="DdlPSModal" CssStyle="width: 100%;" CssClass="DdlPS " CssClassDdl="select2me " UsaWebService="true"
<label for="<%= DdlPSModal.ClientID.ToString()%>">Producto/Servicios:</label> IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" />
<%--<asp:DropDownList ID="DdlPSModal" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="PSCodigo" DataValueField="CvePS" Width="240px" CausesValidation="true"></asp:DropDownList>--%>
<%--<asp:RequiredFieldValidator ID="RFVPS" runat="server" ControlToValidate="DdlPSModal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto / Servicio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpDefinir"></asp:RequiredFieldValidator>--%>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">

View File

@@ -64,9 +64,9 @@ Partial Class Inventarios_RepMaximoMinimo
DdlAlmacenModal.DataBind() DdlAlmacenModal.DataBind()
DdlAlmacenModal.Items.Insert(0, New ListItem("Seleccione Almacén", "-1")) DdlAlmacenModal.Items.Insert(0, New ListItem("Seleccione Almacén", "-1"))
DdlPSModal.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) 'DdlPSModal.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
DdlPSModal.DataBind() 'DdlPSModal.DataBind()
DdlPSModal.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlPSModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpModalMaximoMinimo.Update() UpModalMaximoMinimo.Update()
@@ -86,9 +86,9 @@ Partial Class Inventarios_RepMaximoMinimo
DdlAlmacen.Items.Clear() DdlAlmacen.Items.Clear()
'If DtSubptoyecto.Rows.Count > 0 Then 'If DtSubptoyecto.Rows.Count > 0 Then
'Dim CveSucursal As Integer = DtSubptoyecto(0)("CveSucursal").ToString.ToEntero 'Dim CveSucursal As Integer = DtSubptoyecto(0)("CveSucursal").ToString.ToEntero
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveSubProyecto={0}", DdlSubProyecto.SelectedValue.ToEntero)) DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(String.Format("CveSubProyecto={0}", DdlSubProyecto.SelectedValue.ToEntero))
DdlAlmacen.DataBind() DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
'Else 'Else
' DdlAlmacen.DataSource = Nothing ' DdlAlmacen.DataSource = Nothing
' DdlAlmacen.DataBind() ' DdlAlmacen.DataBind()
@@ -195,7 +195,8 @@ Partial Class Inventarios_RepMaximoMinimo
Private Sub LnkDefinir_Click(sender As Object, e As EventArgs) Handles LnkDefinir.Click Private Sub LnkDefinir_Click(sender As Object, e As EventArgs) Handles LnkDefinir.Click
HFDefinir.Value = "I" HFDefinir.Value = "I"
DdlAlmacenModal.SelectedIndex = 0 DdlAlmacenModal.SelectedIndex = 0
DdlPSModal.SelectedIndex = 0 DdlPSModal.SelectedValue = "-1"
DdlPSModal.SelectedText = "Seleccione"
TxtMaximo.Text = "" TxtMaximo.Text = ""
TxtMinimo.Text = "" TxtMinimo.Text = ""
DdlAlmacenModal.Enabled = True DdlAlmacenModal.Enabled = True
@@ -206,20 +207,26 @@ Partial Class Inventarios_RepMaximoMinimo
End Sub End Sub
Private Sub LbAgregarMaximoMinimo_Click(sender As Object, e As EventArgs) Handles LbAgregarMaximoMinimo.Click Private Sub LbAgregarMaximoMinimo_Click(sender As Object, e As EventArgs) Handles LbAgregarMaximoMinimo.Click
Dim ObjInventario As New ClsInventarios If DdlPSModal.SelectedValue.ToEntero > 0 Then
If HFDefinir.Value = "I" Then
If ObjInventario.AddAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
Alert("El Máximo/Mínimo se agregó correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HFDefinir.Value = "U" Then
If ObjInventario.UpdateAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
Alert("El Máximo/Mínimo se actualizó correctamente.", TipoMensaje.MsgInformacion)
End If
End If
CargaGrid() Using ObjInventario As New ClsInventarios
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo"))
ObjInventario.Dispose() If HFDefinir.Value = "I" Then
If ObjInventario.AddAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
Alert("El Máximo/Mínimo se agregó correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HFDefinir.Value = "U" Then
If ObjInventario.UpdateAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then
Alert("El Máximo/Mínimo se actualizó correctamente.", TipoMensaje.MsgInformacion)
End If
End If
End Using
CargaGrid()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo"))
Else
Alert("Seleccione un producto o servicio", TipoMensaje.MsgAdvertencia)
End If
End Sub End Sub
Protected Sub UpdateMaximoMinimo(sender As Object, e As EventArgs) Protected Sub UpdateMaximoMinimo(sender As Object, e As EventArgs)
@@ -227,13 +234,15 @@ Partial Class Inventarios_RepMaximoMinimo
HFDefinir.Value = "U" HFDefinir.Value = "U"
Dim CveAlmacen As Integer = GvRow.DataKey("CveAlmacen").ToString.ToEntero Dim CveAlmacen As Integer = GvRow.DataKey("CveAlmacen").ToString.ToEntero
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToString.ToEntero Dim CvePS As Integer = GvRow.DataKey("CvePS").ToString.ToEntero
Dim strPS As String = GvRow.DataKey("PS").ToString()
Dim Maximo As String = GvRow.DataKey("Maximo").ToString Dim Maximo As String = GvRow.DataKey("Maximo").ToString
Dim Minimo As String = GvRow.DataKey("Minimo").ToString Dim Minimo As String = GvRow.DataKey("Minimo").ToString
DdlAlmacenModal.Enabled = False DdlAlmacenModal.Enabled = False
DdlPSModal.Enabled = False DdlPSModal.Enabled = False
DdlAlmacenModal.SelectedValue = CveAlmacen.ToString DdlAlmacenModal.SelectedValue = CveAlmacen.ToString()
DdlPSModal.SelectedText = strPS
DdlPSModal.SelectedValue = CvePS.ToString DdlPSModal.SelectedValue = CvePS.ToString
TxtMaximo.Text = Maximo TxtMaximo.Text = Maximo
TxtMinimo.Text = Minimo TxtMinimo.Text = Minimo

View File

@@ -1284,11 +1284,15 @@
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMailrecibonomina" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtMailrecibonomina" Text="Mail recibo nómina:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlRegimenContratacion" runat="server" AppendDataBoundItems="true" DataTextField="RegimenContratacion" CssClass="form-control input-sm select2me" DataValueField="CveSATRegimenContratacion" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlRegimenContratacion" runat="server" AppendDataBoundItems="true" DataTextField="RegimenContratacion" CssClass="form-control input-sm select2me" DataValueField="CveSATRegimenContratacion" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlRegimenContratacion" Text="Mail recibo nómina:"></asp:Label> <asp:Label runat="server" AssociatedControlID="DdlRegimenContratacion" Text="Régimen Contratación:"></asp:Label>
<asp:RequiredFieldValidator ID="RFVRegimenContratacion" runat="server" ControlToValidate="DdlRegimenContratacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Régimen Contratación''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVRegimenContratacion" runat="server" ControlToValidate="DdlRegimenContratacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Régimen Contratación''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i> <i></i>
</div> </div>
@@ -1311,6 +1315,7 @@
<br /> <br />
<asp:CheckBox ID="ChkSeInscribioSS" CssClass="make-switchsd" data-size="small" runat="server" Text="" /> <asp:CheckBox ID="ChkSeInscribioSS" CssClass="make-switchsd" data-size="small" runat="server" Text="" />
</div> </div>
<asp:Panel runat="server" ID="PnlSalarios" Visible="false">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" Enabled ="false" runat="server" MaxLength="10"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" Enabled ="false" runat="server" MaxLength="10"></asp:TextBox>
@@ -1340,6 +1345,7 @@
<i></i> <i></i>
</asp:Panel> </asp:Panel>
</asp:Panel>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtBono" runat="server" MaxLength="10" Text="0"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtBono" runat="server" MaxLength="10" Text="0"></asp:TextBox>

View File

@@ -12,8 +12,8 @@ Imports System.Xml
Imports System.Web.Script.Services Imports System.Web.Script.Services
Partial Class RH_Personal Partial Class RH_Personal
Inherits ClsPaginas Inherits ClsPaginas
#Region "P R O P I E D A D E S" #Region "P R O P I E D A D E S"
Private Property DTCuentasBancos As DataTable Private Property DTCuentasBancos As DataTable
Get Get
@@ -331,14 +331,14 @@ Partial Class RH_Personal
Set(value As Integer) Set(value As Integer)
ViewState("CveMovimientoDetalleUniforme") = value ViewState("CveMovimientoDetalleUniforme") = value
End Set End Set
End Property End Property
#End Region #End Region
#Region "V A C A C I O N E S - P E R M I S O S" #Region "V A C A C I O N E S - P E R M I S O S"
Private Property VacInicioPeriodo As Date Private Property VacInicioPeriodo As Date
Get Get
If ViewState("VacInicioPeriodo") Is Nothing Then If ViewState("VacInicioPeriodo") Is Nothing Then
@@ -538,13 +538,13 @@ Partial Class RH_Personal
Set(value As Integer) Set(value As Integer)
ViewState("CvePermiso") = value ViewState("CvePermiso") = value
End Set End Set
End Property End Property
#End Region #End Region
#Region "PROPIEDADES FAMILIARES" #Region "PROPIEDADES FAMILIARES"
Private Property ActualizarFamiliar As Boolean Private Property ActualizarFamiliar As Boolean
Get Get
If ViewState("ActualizarFamiliar") Is Nothing Then If ViewState("ActualizarFamiliar") Is Nothing Then
@@ -782,7 +782,7 @@ Partial Class RH_Personal
pnlSalarioIMSS.Visible = False pnlSalarioIMSS.Visible = False
End If End If
' '
PnlSalarios.Visible = UsuarioActual.Empresa.Funcionalidad(701) = "1"
ViewState("Orden") = "" ViewState("Orden") = ""
ViewState("Orden1") = "" ViewState("Orden1") = ""
@@ -970,10 +970,10 @@ Partial Class RH_Personal
Private Sub SetPermisos() Private Sub SetPermisos()
'Permisos 'Permisos
End Sub End Sub
#Region "Carga Combos" #Region "Carga Combos"
Private Sub CargaEscolaridad() Private Sub CargaEscolaridad()
DdlEscolaridad.DataSource = GlobalDTEscolaridad DdlEscolaridad.DataSource = GlobalDTEscolaridad
DdlEscolaridad.DataBind() DdlEscolaridad.DataBind()
@@ -1204,16 +1204,16 @@ Partial Class RH_Personal
Nom.Dispose() Nom.Dispose()
GvNominas.DataBind() GvNominas.DataBind()
End Sub End Sub
#End Region #End Region
#Region "Asistencias" #Region "Asistencias"
Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs) Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim ObjRH As New ClsRH Dim ObjRH As New ClsRH
@@ -1321,7 +1321,7 @@ Partial Class RH_Personal
ObjPersonal.Dispose() ObjPersonal.Dispose()
BtnConsultarAsistencia_Click(sender, e) BtnConsultarAsistencia_Click(sender, e)
End Sub End Sub
#End Region #End Region
Private Sub CargaConsignacion() Private Sub CargaConsignacion()
@@ -1340,8 +1340,8 @@ Partial Class RH_Personal
ChkEstemporal.Checked = ObjPersonal.DtResultados.Rows(0)("esTemporal").ToString() = "1" ChkEstemporal.Checked = ObjPersonal.DtResultados.Rows(0)("esTemporal").ToString() = "1"
CHKRFCValidado.Checked = ObjPersonal.DtResultados.Rows(0)("RFCValidado").ToString() = "1" CHKRFCValidado.Checked = ObjPersonal.DtResultados.Rows(0)("RFCValidado").ToString() = "1"
TxtMailrecibonomina.Text = ObjPersonal.DtResultados.Rows(0)("MaiReciboNomina").ToString()
'Carga Datos Personales 'Carga Datos Personales
LtlPersonal.Text = ObjPersonal.NombreCompleto LtlPersonal.Text = ObjPersonal.NombreCompleto
NombreCompleto = ObjPersonal.NombreCompleto NombreCompleto = ObjPersonal.NombreCompleto
'TxtNombre.Text = ObjPersonal.Nombre 'TxtNombre.Text = ObjPersonal.Nombre
@@ -1942,11 +1942,11 @@ Partial Class RH_Personal
DdlClienteAsignado.Attributes.Remove("onclick") DdlClienteAsignado.Attributes.Remove("onclick")
DdlClienteAsistenciaC.Attributes.Remove("onclick") DdlClienteAsistenciaC.Attributes.Remove("onclick")
DdlClienteAsistenciaA.Attributes.Remove("onclick") DdlClienteAsistenciaA.Attributes.Remove("onclick")
End Sub End Sub
#Region "Buzón de Calidad" #Region "Buzón de Calidad"
Private Sub CargaBuzonCalidad() Private Sub CargaBuzonCalidad()
Dim ObjPersonal As New ClsRH Dim ObjPersonal As New ClsRH
@@ -2282,12 +2282,12 @@ Partial Class RH_Personal
End If End If
GvBuzonCalidad.DataBind() GvBuzonCalidad.DataBind()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
#End Region #End Region
#Region "Resguardos" #Region "Resguardos"
Protected Sub GvResguardos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvResguardos.RowDataBound Protected Sub GvResguardos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvResguardos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2310,13 +2310,13 @@ Partial Class RH_Personal
e.Row.FCLiteral("LtlAF").Text = Liga & e.Row.FCLiteral("LtlAF").Text & "</a>" e.Row.FCLiteral("LtlAF").Text = Liga & e.Row.FCLiteral("LtlAF").Text & "</a>"
End If End If
End Sub End Sub
#End Region #End Region
#Region "Nómina" #Region "Nómina"
Private Sub CarcaConceptosNomina() Private Sub CarcaConceptosNomina()
Dim ObjPersonal As New ClsRH Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then
@@ -2505,9 +2505,9 @@ Partial Class RH_Personal
ObjPersonal.Dispose() ObjPersonal.Dispose()
End If End If
End Sub End Sub
#End Region #End Region
Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Ddl As DropDownList = DirectCast(sender, DropDownList) Dim Ddl As DropDownList = DirectCast(sender, DropDownList)
@@ -2589,10 +2589,10 @@ Partial Class RH_Personal
End If End If
End If End If
End Sub End Sub
#Region "G A S T O S X C O M P R O B A R" #Region "G A S T O S X C O M P R O B A R"
Protected Sub RBLTipoGastos_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub RBLTipoGastos_SelectedIndexChanged(sender As Object, e As EventArgs)
If RBLTipoGastos.SelectedValue = "1" Then If RBLTipoGastos.SelectedValue = "1" Then
@@ -2681,10 +2681,10 @@ Partial Class RH_Personal
End If End If
End Sub End Sub
#End Region #End Region
#Region "E V E N T O - B I T A C O R A" #Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2760,9 +2760,9 @@ Partial Class RH_Personal
HttpContext.Current.Response.End() HttpContext.Current.Response.End()
Archivo = Nothing Archivo = Nothing
End Sub End Sub
#End Region #End Region
Protected Sub GvGxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGxC.RowDataBound, GvGxCHistorial.RowDataBound Protected Sub GvGxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGxC.RowDataBound, GvGxCHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 1 Then If e.Row.RowIndex = 1 Then
@@ -2815,7 +2815,7 @@ Partial Class RH_Personal
End Sub End Sub
#Region "TAB BANCOS" #Region "TAB BANCOS"
Private Sub CargaMonedas() Private Sub CargaMonedas()
DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataSource = GlobalDTMonedas
@@ -2963,8 +2963,8 @@ Partial Class RH_Personal
ObjCuentasBancos.Dispose() ObjCuentasBancos.Dispose()
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
End Sub End Sub
#Region "GRIDVIEW - CUENTAS BANCARIAS" #Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -3117,11 +3117,11 @@ Partial Class RH_Personal
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString())
ObjCuentasBancos.Dispose() ObjCuentasBancos.Dispose()
CargaGvBitacora() CargaGvBitacora()
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region "O R D E N A M I E N T O" #Region "O R D E N A M I E N T O"
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs) Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim Orden As String = "" Dim Orden As String = ""
@@ -3157,10 +3157,10 @@ Partial Class RH_Personal
ViewState("Orden1") = Orden ViewState("Orden1") = Orden
CargaGvAsistencias() CargaGvAsistencias()
End If End If
End Sub End Sub
#End Region #End Region
#Region "I M P R I M I R N O M I N A" #Region "I M P R I M I R N O M I N A"
Protected Sub LbPDF_Click(sender As Object, e As EventArgs) Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
@@ -3168,11 +3168,11 @@ Partial Class RH_Personal
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo") ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo")
End Sub End Sub
#End Region #End Region
#Region " ORGANIGRAMA " #Region " ORGANIGRAMA "
Private Sub CargaSuperioresOrganigrama() Private Sub CargaSuperioresOrganigrama()
Dim ObjRH As New ClsRH Dim ObjRH As New ClsRH
@@ -3193,10 +3193,10 @@ Partial Class RH_Personal
End Sub End Sub
#End Region #End Region
#Region "I M P R I M I R " #Region "I M P R I M I R "
Private Sub GenerarPDF(Optional Formato As String = "PDF") Private Sub GenerarPDF(Optional Formato As String = "PDF")
@@ -3498,12 +3498,12 @@ Partial Class RH_Personal
End Sub End Sub
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
GenerarPDFGastosXComp("Excel") GenerarPDFGastosXComp("Excel")
End Sub End Sub
#End Region #End Region
#Region "D O C U M E N T A C I O N C O N T R A T O S" #Region "D O C U M E N T A C I O N C O N T R A T O S"
Private Sub CargaDocumentacionFirmaDecontratos() Private Sub CargaDocumentacionFirmaDecontratos()
If CvePersonal > 0 Then If CvePersonal > 0 Then
@@ -4220,10 +4220,10 @@ Partial Class RH_Personal
RegistraScript("Download('" & baseUrl & "')") RegistraScript("Download('" & baseUrl & "')")
End Sub End Sub
#End Region #End Region
Protected Sub LBCancelar_Click(sender As Object, e As EventArgs) Protected Sub LBCancelar_Click(sender As Object, e As EventArgs)
Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString() Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString()
@@ -4244,10 +4244,10 @@ Partial Class RH_Personal
Obj = Nothing Obj = Nothing
End Sub End Sub
#Region "VACACIONES" #Region "VACACIONES"
Private Sub CargaVacaciones() Private Sub CargaVacaciones()
Dim objRH As New ClsRH Dim objRH As New ClsRH
@@ -4941,12 +4941,12 @@ Partial Class RH_Personal
objRH.Dispose() objRH.Dispose()
Return ListaTags Return ListaTags
End Function End Function
#End Region #End Region
#Region "CURSOS" #Region "CURSOS"
Private Sub CargaCursos() Private Sub CargaCursos()
Dim objRH As New ClsRH Dim objRH As New ClsRH
@@ -5044,11 +5044,11 @@ Partial Class RH_Personal
End Sub End Sub
#End Region #End Region
#Region "UNIFORMES" #Region "UNIFORMES"
Private Sub CargaComboUniformes() Private Sub CargaComboUniformes()
@@ -5184,12 +5184,12 @@ Partial Class RH_Personal
ObjInventario.RollBack() ObjInventario.RollBack()
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
End Sub End Sub
#End Region #End Region
#Region "CARGAR IMAGEN" #Region "CARGAR IMAGEN"
Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchivo")) RegistraScript(String.Format("$('#{0}').modal();", "ModalArchivo"))
@@ -5231,10 +5231,10 @@ Partial Class RH_Personal
TxtCargaImg.Text = "[]" TxtCargaImg.Text = "[]"
UpAddArchivo.Update() UpAddArchivo.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo")) RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
End Sub End Sub
#Region "PERMISOS" #Region "PERMISOS"
Public Sub CargaPermisos() Public Sub CargaPermisos()
Dim ObjRH As New ClsRH Dim ObjRH As New ClsRH
@@ -5360,57 +5360,57 @@ Partial Class RH_Personal
ObjRH.Dispose() ObjRH.Dispose()
CargaPermisos() CargaPermisos()
End Sub End Sub
#End Region #End Region
#End Region #End Region
'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
' Preguntar si existe en temporales ' Preguntar si existe en temporales
' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then
' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString())
' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' Else ' Else
' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
' End If ' End If
' Else ' Else
' Imagen Default ' Imagen Default
' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg" ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
' End If ' End If
' End If ' End If
' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = "" ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = "" ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then
' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString()) ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString())
' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
' Session("FileUpload") = "" ' Session("FileUpload") = ""
' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
' End If ' End If
' End If ' End If
'End Sub 'End Sub
#Region "Consumos" #Region "Consumos"
Private Sub Consumos() Private Sub Consumos()
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
@@ -5489,10 +5489,10 @@ Partial Class RH_Personal
End Sub End Sub
Protected Sub LnkImprimirPDFConsumo_Click(sender As Object, e As EventArgs) Protected Sub LnkImprimirPDFConsumo_Click(sender As Object, e As EventArgs)
GenerarPDFConsumo() GenerarPDFConsumo()
End Sub End Sub
#End Region #End Region
#Region "" #Region ""
Protected Sub LbMail_Click(sender As Object, e As EventArgs) Protected Sub LbMail_Click(sender As Object, e As EventArgs)
@@ -5576,9 +5576,9 @@ Partial Class RH_Personal
End If End If
End Sub End Sub
#End Region #End Region
#Region "VIATICOS" #Region "VIATICOS"
Protected Sub CargaViaticosPersonal() Protected Sub CargaViaticosPersonal()
Dim ObjBancos As ClsBancos = New ClsBancos Dim ObjBancos As ClsBancos = New ClsBancos
@@ -5613,11 +5613,11 @@ Partial Class RH_Personal
If (e.Row.RowType = DataControlRowType.Footer) Then If (e.Row.RowType = DataControlRowType.Footer) Then
e.Row.FCLiteral("LtTotalImporte").Text = DTViaticosDetalle.SUM("Importe").FormatoNumero() e.Row.FCLiteral("LtTotalImporte").Text = DTViaticosDetalle.SUM("Importe").FormatoNumero()
End If End If
End Sub End Sub
#End Region #End Region
#Region "BITACORA" #Region "BITACORA"
Private Sub CargaGvBitacora() Private Sub CargaGvBitacora()
If CvePersonal > 0 Then If CvePersonal > 0 Then
@@ -5630,12 +5630,12 @@ Partial Class RH_Personal
UpHistorialModificacion.Update() UpHistorialModificacion.Update()
End If End If
End Sub End Sub
#End Region #End Region
#Region "PAGO DE FACTURAS" #Region "PAGO DE FACTURAS"
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaPagoFactura() CargaPagoFactura()
UpnHistorial.Update() UpnHistorial.Update()
@@ -5648,10 +5648,10 @@ Partial Class RH_Personal
End If End If
ObjRH.Dispose() ObjRH.Dispose()
GVPagoFactura.DataBind() GVPagoFactura.DataBind()
End Sub End Sub
#End Region #End Region
Protected Sub BtnSaldoInicial_Click(sender As Object, e As EventArgs) Protected Sub BtnSaldoInicial_Click(sender As Object, e As EventArgs)
Dim SaldoInicial As Double = TxtSaldoInicial.Text.ToDouble() Dim SaldoInicial As Double = TxtSaldoInicial.Text.ToDouble()
Dim Fecha As DateTime = TxtFechaSaldo.Text.ToDateTime() Dim Fecha As DateTime = TxtFechaSaldo.Text.ToDateTime()
@@ -5667,8 +5667,8 @@ Partial Class RH_Personal
End Sub End Sub
Private Function AgregarSaldoInicial(SaldoInicial As Double, Fecha As DateTime, CveMoneda As Integer, ObjMov As ClsContabilidad) As Integer Private Function AgregarSaldoInicial(SaldoInicial As Double, Fecha As DateTime, CveMoneda As Integer, ObjMov As ClsContabilidad) As Integer
Return ObjMov.AddPrePolizas("RH/Personal", 13, SaldoInicial, SaldoInicial, CveMoneda, Fecha, "Saldo Inicial", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Return ObjMov.AddPrePolizas("RH/Personal", 13, SaldoInicial, SaldoInicial, CveMoneda, Fecha, "Saldo Inicial", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
End Function End Function
#Region "L I C E N C I A S" #Region "L I C E N C I A S"
Public Sub CargaLicencias() Public Sub CargaLicencias()
If CvePersonal > 0 Then If CvePersonal > 0 Then
@@ -5815,7 +5815,7 @@ Partial Class RH_Personal
End If End If
RegistraScript("$('#DivAddLicencias').modal('hide');") RegistraScript("$('#DivAddLicencias').modal('hide');")
End Sub End Sub
#End Region #End Region
Protected Sub BtnPDFResguardo_Click(sender As Object, e As EventArgs) Protected Sub BtnPDFResguardo_Click(sender As Object, e As EventArgs)
GenerarPDFResguardosAF() GenerarPDFResguardosAF()
@@ -5892,12 +5892,12 @@ Partial Class RH_Personal
Alert("No se encontraron registros .", TipoMensaje.MsgAdvertencia) Alert("No se encontraron registros .", TipoMensaje.MsgAdvertencia)
End If End If
End Sub End Sub
#Region "FAMILIARES" #Region "FAMILIARES"
Private Sub CargaFamiliares() Private Sub CargaFamiliares()
If CvePersonal <> -1 Then If CvePersonal <> -1 Then
@@ -6148,11 +6148,11 @@ Partial Class RH_Personal
'objRH.Dispose() 'objRH.Dispose()
End Sub End Sub
#End Region #End Region
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim ddl As DropDownList = DirectCast(sender, DropDownList) Dim ddl As DropDownList = DirectCast(sender, DropDownList)
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow) Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)

View File

@@ -88,6 +88,8 @@