This commit is contained in:
@@ -172,6 +172,25 @@ Public Class ClsNominas
|
|||||||
|
|
||||||
#Region "ClsNominas_Nominas"
|
#Region "ClsNominas_Nominas"
|
||||||
|
|
||||||
|
Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||||
|
.Add("@Ejercicio", SqlDbType.Int).Value = ejercicio
|
||||||
|
.Add("@Importe", SqlDbType.Float).Value = importe
|
||||||
|
.Add("@CveTipoPeriodo", SqlDbType.Float).Value = CveTipoPeriodo
|
||||||
|
.Add("@CvePeriodo", SqlDbType.Float).Value = CvePeriodo
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al Realizar el calculo del Aguinaldo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean
|
Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure)
|
DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure)
|
||||||
@@ -1890,6 +1909,102 @@ Public Class ClsNominas
|
|||||||
End Try
|
End Try
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
#Region "MovtosPermanentes"
|
||||||
|
|
||||||
|
Public Function GetMovtoPermanente(CveEmpresa As Int32, CvePersonal As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_GetMovtoPermanente", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto)
|
||||||
|
.Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal)
|
||||||
|
.Add("@descripcion", SqlDbType.VarChar).Value = (descripcion)
|
||||||
|
.Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento)
|
||||||
|
.Add("@valor", SqlDbType.Float).Value = (valor)
|
||||||
|
.Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar)
|
||||||
|
.Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite)
|
||||||
|
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
||||||
|
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function UpMovtoPermanente(cveMovtoPermanente As Int32, cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_UpMovtoPermanente", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente)
|
||||||
|
.Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto)
|
||||||
|
.Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal)
|
||||||
|
.Add("@descripcion", SqlDbType.VarChar).Value = (descripcion)
|
||||||
|
.Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento)
|
||||||
|
.Add("@valor", SqlDbType.Float).Value = (valor)
|
||||||
|
.Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar)
|
||||||
|
.Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite)
|
||||||
|
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
||||||
|
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function RemoveMovtoPermanente(cveMovtoPermanente As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_RemoveMovtoPermanente", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente)
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -131,7 +131,8 @@ Public Class ClsRH
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
|
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
|
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
|
||||||
@@ -143,6 +144,12 @@ Public Class ClsRH
|
|||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
|
.Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion
|
||||||
|
.Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad
|
||||||
|
.Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
|
||||||
|
.Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
|
||||||
|
.Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -161,7 +168,8 @@ Public Class ClsRH
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer) As Boolean
|
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
|
||||||
|
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
|
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
|
||||||
@@ -172,6 +180,12 @@ Public Class ClsRH
|
|||||||
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
.Add("@CveAsistenciasInasistencias", SqlDbType.Int).Value = CveAI
|
.Add("@CveAsistenciasInasistencias", SqlDbType.Int).Value = CveAI
|
||||||
|
|
||||||
|
.Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion
|
||||||
|
.Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad
|
||||||
|
.Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
|
||||||
|
.Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
|
||||||
|
.Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
|
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -782,7 +782,157 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel ID="TabMovtosPermanentes" runat="server" HeaderText="Movimientos Permanentes">
|
<ajax:TabPanel ID="TabMovtosPermanentes" runat="server" HeaderText="Movimientos Permanentes">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UpMovtosPermanentes" UpdateMode="Conditional" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="portlet light xspadding bordered " id="pnlListMovtos">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="icon-pin font-yellow-gold"></i>
|
||||||
|
<span class="caption-subject font-yellow-gold bold uppercase">Movimientos</span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<asp:LinkButton ID="LnkAddMovtoPermanente" OnClick="LnkAddMovtoPermanente_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body ">
|
||||||
|
|
||||||
|
<asp:GridView ID="GVMovtoPermanente" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall " AutoGenerateColumns="False"
|
||||||
|
ShowHeader ="false" EmptyDataText="No se encontraron Movimientos"
|
||||||
|
DataKeyNames="CveMovtoPermanente,CveConcepto,CvePersonal,Descripcion,TipoDescuento,Valor,VecesAplicar,MontoLimite,FechaInicioAplicacion,Estatus,FechaRegistro">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarMovtoPermanente_Click"
|
||||||
|
CssClass="lnkMovotPermanente" runat="server" Text='<%# Eval("Descripcion")%>'></asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:Panel runat="server" Visible="false" CssClass="portlet light xspadding bordered " ID="pnlAddupMovto">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="icon-pin font-yellow-gold"></i>
|
||||||
|
<span class="caption-subject font-yellow-gold bold uppercase">
|
||||||
|
<asp:Literal ID="LtlMovtoPermanenteaddup" runat="server"></asp:Literal></span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body ">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario "
|
||||||
|
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Descripción:" AssociatedControlID="TxtDescripcion"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:Label runat="server" Text="Tipo Concepto:" AssociatedControlID=""></asp:Label>
|
||||||
|
<asp:DropDownList ID="DdlTipo" runat="server" AppendDataBoundItems="True" OnSelectedIndexChanged="DdlTipo_SelectedIndexChanged" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="TipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Value="P" Text="Percepciones"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="D" Selected ="True" Text="Deducciones"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="O" Text="Obligaciones"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:Label runat="server" Text="Concepto:" AssociatedControlID=""></asp:Label>
|
||||||
|
<asp:DropDownList ID="DdlConcepto" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:Label runat="server" Text="Tipo Descuento:" AssociatedControlID=""></asp:Label>
|
||||||
|
<asp:DropDownList ID="DdlTipoDescto" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDescto_SelectedIndexChanged" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="2" Text="Porcentaje"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="3" Text="Importe(Tope Monto)"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="4" Text="Porcentaje(Tope Monto)"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtValor" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvValor" runat="server" ControlToValidate="TxtValor" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario "
|
||||||
|
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Valor:" AssociatedControlID="TxtValor"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:Panel runat="server" ID="pnlVecesAplicar" CssClass="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtVecesAplicar" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvVecesAplicar" runat="server" ControlToValidate="TxtVecesAplicar" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Veces por Aplicar''</b> es necesario "
|
||||||
|
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Veces por Aplicar:" AssociatedControlID="TxtVecesAplicar"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
<asp:Panel runat="server" ID="pnlMonto" CssClass="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtMontoLimite" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvMontoLimite" runat="server" ControlToValidate="TxtMontoLimite" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Monto Limite''</b> es necesario "
|
||||||
|
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Monto Limite:" AssociatedControlID="TxtMontoLimite"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtFechaAplicacion" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvFechaAplicacion" runat="server" ControlToValidate="TxtFechaAplicacion" 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="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Fecha de Aplicación: " AssociatedControlID="TxtFechaAplicacion"></asp:Label>
|
||||||
|
<ajax:MaskedEditExtender ID="MKEFechaAplicacion" runat="server" TargetControlID="TxtFechaAplicacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender ID="CEFechaAplicacion" runat="server" TargetControlID="TxtFechaAplicacion" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVFechaAplicacion" runat="server" ControlToValidate="TxtFechaAplicacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-3">Activo?</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<asp:CheckBox ID="ChkEstatus" CssClass="chksino " Text=" " runat="server" /></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-right">
|
||||||
|
<asp:LinkButton ID="LnkAddMovto" OnClick="LnkAddMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-primary" runat="server">Agregar</asp:LinkButton>
|
||||||
|
<asp:LinkButton ID="LnkUpMovto" OnClick="LnkUpMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
|||||||
@@ -93,6 +93,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
set { ViewState["CvePeriodoSeleccionado"] = value; }
|
set { ViewState["CvePeriodoSeleccionado"] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int CcveMovtoPermanente
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ViewState["CcveMovtoPermanente"] == null) { return 0; }
|
||||||
|
else { return ViewState["CcveMovtoPermanente"].ToString().ToEntero(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
set { ViewState["CcveMovtoPermanente"] = value; }
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -912,6 +923,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
LblEmpleado.Text = Nombre;
|
LblEmpleado.Text = Nombre;
|
||||||
TabPersonal.ActiveTabIndex = 0;
|
TabPersonal.ActiveTabIndex = 0;
|
||||||
mostrarConceptos();
|
mostrarConceptos();
|
||||||
|
pnlAddupMovto.Visible = false;
|
||||||
|
CargaMovtoPermanente();
|
||||||
RegistraScript("$('#ModalConceptos').modal();");
|
RegistraScript("$('#ModalConceptos').modal();");
|
||||||
}
|
}
|
||||||
private void mostrarConceptos()
|
private void mostrarConceptos()
|
||||||
@@ -2852,4 +2865,164 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
ImprimirReporte();
|
ImprimirReporte();
|
||||||
}
|
}
|
||||||
|
#region Movtos Permanentes
|
||||||
|
|
||||||
|
protected void CargaTipoConcepto()
|
||||||
|
{
|
||||||
|
//DdlTipo.Items.Insert(0, new ListItem("Percepciones", "P"));
|
||||||
|
//DdlTipo.Items.Insert(1, new ListItem("Deducciones", "D"));
|
||||||
|
//DdlTipo.Items.Insert(2, new ListItem("Obligaciones", "O"));
|
||||||
|
//DdlTipo.SelectedValueExist("-1");
|
||||||
|
CargaConcepto();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void CargaConcepto()
|
||||||
|
{
|
||||||
|
DdlConcepto.Items.Clear();
|
||||||
|
if (DdlTipo.SelectedValue == "-1")
|
||||||
|
{
|
||||||
|
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("Tipo ='{0}'", DdlTipo.SelectedValue));
|
||||||
|
}
|
||||||
|
DdlConcepto.DataBind();
|
||||||
|
DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
DdlConcepto.SelectedValueExist("-1");
|
||||||
|
}
|
||||||
|
private void CargaMovtoPermanente()
|
||||||
|
{
|
||||||
|
|
||||||
|
using (ClsNominas ObjMovt = new ClsNominas())
|
||||||
|
{
|
||||||
|
ObjMovt.GetMovtoPermanente(UsuarioActual.CveEmpresa, SRCvePersonal);
|
||||||
|
GVMovtoPermanente.DataSource = ObjMovt.DtResultados;
|
||||||
|
|
||||||
|
}
|
||||||
|
GVMovtoPermanente.DataBind();
|
||||||
|
UpMovtosPermanentes.Update();
|
||||||
|
}
|
||||||
|
protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CargaConcepto();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CargaConcepto();
|
||||||
|
DdlTipoDescto_SelectedIndexChanged(null, null);
|
||||||
|
pnlAddupMovto.Visible = true;
|
||||||
|
LnkAddMovto.Visible = true;
|
||||||
|
LnkUpMovto.Visible = false;
|
||||||
|
LtlMovtoPermanenteaddup.Text = "Agregar Movimiento";
|
||||||
|
|
||||||
|
TxtDescripcion.Text = "";
|
||||||
|
TxtValor.Text = "";
|
||||||
|
TxtVecesAplicar.Text = "";
|
||||||
|
TxtMontoLimite.Text = "";
|
||||||
|
TxtFechaAplicacion.Text = "";
|
||||||
|
ChkEstatus.Visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkAddMovto_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
||||||
|
string descripcion = TxtDescripcion.Text;
|
||||||
|
int tipoDescuento = DdlTipoDescto.SelectedValue.ToEntero();
|
||||||
|
double valor = TxtValor.Text.ToDouble();
|
||||||
|
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||||
|
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
|
||||||
|
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||||
|
bool estatus = ChkEstatus.Checked;
|
||||||
|
bool Continuar;
|
||||||
|
using (ClsNominas ObjMovt = new ClsNominas())
|
||||||
|
{
|
||||||
|
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (Continuar)
|
||||||
|
{
|
||||||
|
this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
|
||||||
|
CargaMovtoPermanente();
|
||||||
|
UpMovtosPermanentes.Update();
|
||||||
|
this.Alert("El Movto_Permanente Se ha agregado");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkUpMovto_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
||||||
|
string descripcion = TxtDescripcion.Text;
|
||||||
|
int tipoDescuento = DdlTipoDescto.SelectedValue.ToEntero();
|
||||||
|
double valor = TxtValor.Text.ToDouble();
|
||||||
|
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||||
|
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
|
||||||
|
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||||
|
bool estatus = ChkEstatus.Checked;
|
||||||
|
bool Continuar;
|
||||||
|
using (ClsNominas ObjMovt = new ClsNominas())
|
||||||
|
{
|
||||||
|
Continuar = ObjMovt.UpMovtoPermanente(CcveMovtoPermanente, cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (Continuar)
|
||||||
|
{
|
||||||
|
this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
|
||||||
|
CargaMovtoPermanente();
|
||||||
|
UpMovtosPermanentes.Update();
|
||||||
|
this.Alert("El Movto_Permanente Se ha agregado");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void DdlTipoDescto_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
pnlMonto.Visible = DdlTipoDescto.SelectedValue.ToEntero() > 2;
|
||||||
|
pnlVecesAplicar.Visible = DdlTipoDescto.SelectedValue.ToEntero() < 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
|
CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero();
|
||||||
|
int cveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||||
|
int cvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||||
|
string descripcion = gvRow.DataKey("Descripcion");
|
||||||
|
int tipoDescuento = gvRow.DataKey("TipoDescuento").ToEntero();
|
||||||
|
double valor = gvRow.DataKey("Valor").ToDouble();
|
||||||
|
int vecesAplicar = gvRow.DataKey("VecesAplicar").ToEntero();
|
||||||
|
decimal montoLimite = gvRow.DataKey("MontoLimite").ToDecimal();
|
||||||
|
DateTime fechaInicioAplicacion = gvRow.DataKey("FechaInicioAplicacion").ToDate();
|
||||||
|
bool estatus = gvRow.DataKey("Estatus") == "1" || gvRow.DataKey("Estatus").ToUpper() == "TRUE";
|
||||||
|
DateTime fechaRegistro = gvRow.DataKey("FechaRegistro").ToDateTime();
|
||||||
|
string tipo = "P";
|
||||||
|
DataRow drow = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("Tipo ='{0}'", cveConcepto));
|
||||||
|
if (drow != null)
|
||||||
|
{
|
||||||
|
tipo = drow["Tipo"].ToString();
|
||||||
|
DdlTipo.SelectedValueExist(tipo);
|
||||||
|
DdlTipo_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
DdlConcepto.SelectedValueExist(cveConcepto);
|
||||||
|
TxtDescripcion.Text = descripcion.ToString();
|
||||||
|
DdlTipoDescto.SelectedValueExist(tipoDescuento.ToString());
|
||||||
|
DdlTipoDescto_SelectedIndexChanged(null, null);
|
||||||
|
|
||||||
|
TxtValor.Text = valor.ToString();
|
||||||
|
TxtVecesAplicar.Text = vecesAplicar.ToString();
|
||||||
|
TxtMontoLimite.Text = montoLimite.ToString();
|
||||||
|
TxtFechaAplicacion.Text = $"{fechaInicioAplicacion:dd/MM/yyyy}";
|
||||||
|
ChkEstatus.Checked = estatus;
|
||||||
|
this.RegistraScript("$('#DModalMovtoPermanente').modal();");
|
||||||
|
|
||||||
|
|
||||||
|
pnlAddupMovto.Visible = true;
|
||||||
|
LnkAddMovto.Visible = false;
|
||||||
|
LnkUpMovto.Visible = true;
|
||||||
|
UpMovtosPermanentes.Update();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -59,10 +59,10 @@ Partial Class Nomina_ReportePTU
|
|||||||
utilimporte = TxtPA_Nimporte.Text.ToDouble()
|
utilimporte = TxtPA_Nimporte.Text.ToDouble()
|
||||||
utilimporteAnt = TxtPA_NimporteA.Text.ToDouble()
|
utilimporteAnt = TxtPA_NimporteA.Text.ToDouble()
|
||||||
|
|
||||||
Dim objnom As New ClsNominas()
|
Using objnom As New ClsNominas()
|
||||||
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
|
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
|
||||||
DTUtilidades = objnom.DtResultados
|
DTUtilidades = objnom.DtResultados
|
||||||
objnom.Dispose()
|
End Using
|
||||||
|
|
||||||
cargaEjercicio(DTUtilidades)
|
cargaEjercicio(DTUtilidades)
|
||||||
LnkAutorizarModal.Visible = True
|
LnkAutorizarModal.Visible = True
|
||||||
@@ -155,7 +155,7 @@ Partial Class Nomina_ReportePTU
|
|||||||
If Not IsNothing(rowc) Then
|
If Not IsNothing(rowc) Then
|
||||||
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
|
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
|
||||||
Else
|
Else
|
||||||
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0)
|
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0)
|
||||||
End If
|
End If
|
||||||
If CveConcepto < 1 Then
|
If CveConcepto < 1 Then
|
||||||
continuar = False
|
continuar = False
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
@@ -33,7 +31,7 @@
|
|||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -58,9 +56,38 @@
|
|||||||
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString = "Aplica", True, False) %>' />
|
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString() = "Aplica", True, False) %>' />
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Aplica Vacaciones" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlAplicaVacacion" runat="server" Text='<%# Eval("AplicaVacacion") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Aplica Incapacidad" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlAplica" runat="server" Text='<%# Eval("AplicaIncapacidad") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Aplica Retardo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlAplicaRetardo" runat="server" Text='<%# Eval("AplicaRetardo") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Aplica Aguinaldo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlAplicaAguinaldo" runat="server" Text='<%# Eval("AplicaAguinaldo") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Aplica Utilidades" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
|
||||||
@@ -121,19 +148,46 @@
|
|||||||
<asp:TextBox ID="TipoTxt" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TipoTxt" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<label for="TipoTxt">Tipo:</label>
|
<label for="TipoTxt">Tipo:</label>
|
||||||
<i></i>
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<div class="row">
|
||||||
<div ID="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
<div class="col-md-4">
|
||||||
<label for="AplicaNoAplica">Aplica Asistencia:</label>
|
<div id="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="AplicaNoAplica">Aplica Asistencia:</label><br />
|
||||||
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||||
<i></i>
|
|
||||||
</div>
|
</div>
|
||||||
<br ID="saltoDeLinea" runat="server" />
|
</div>
|
||||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
<div class="col-md-4" style="display:none;">
|
||||||
<label for="ChkEstatus">Activo:</label>
|
<label for="AplicaFalta">Aplica Falta:</label><br />
|
||||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
<asp:CheckBox ID="AplicaFalta" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
<i></i>
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="AplicaVacacion">Aplica Vacaciones:</label><br />
|
||||||
|
<asp:CheckBox ID="AplicaVacacion" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="AplicaIncapacidad">Aplica Incapacidad:</label><br />
|
||||||
|
<asp:CheckBox ID="AplicaIncapacidad" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="AplicaRetardo">Aplica Retardo:</label><br />
|
||||||
|
<asp:CheckBox ID="AplicaRetardo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="AplicaAguinaldo">Aplica Aguinaldo:</label><br />
|
||||||
|
<asp:CheckBox ID="AplicaAguinaldo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="AplicaUtilidades">Aplica Utilidades:</label><br />
|
||||||
|
<asp:CheckBox ID="AplicaUtilidades" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="ChkEstatus">Activo:</label><br />
|
||||||
|
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -63,7 +63,13 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
BtnEditarTiposDModal.Visible = False
|
BtnEditarTiposDModal.Visible = False
|
||||||
BtnAgregarTiposDModal.Visible = True
|
BtnAgregarTiposDModal.Visible = True
|
||||||
CheckActiveSection.Visible = False
|
CheckActiveSection.Visible = False
|
||||||
saltoDeLinea.Visible = False
|
AplicaNoAplica.Checked = False
|
||||||
|
AplicaFalta.Checked = False
|
||||||
|
AplicaVacacion.Checked = False
|
||||||
|
AplicaIncapacidad.Checked = False
|
||||||
|
AplicaRetardo.Checked = False
|
||||||
|
AplicaAguinaldo.Checked = False
|
||||||
|
AplicaUtilidades.Checked = False
|
||||||
TipoTxt.Text = ""
|
TipoTxt.Text = ""
|
||||||
UpModalTiposD.Update()
|
UpModalTiposD.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||||
@@ -72,7 +78,16 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
|
||||||
Dim ObjAsistenciasInasistencias As New ClsRH
|
Dim ObjAsistenciasInasistencias As New ClsRH
|
||||||
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, Not AplicaNoAplica.Checked, AplicaNoAplica.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
Dim chkAplicaNoAplica As Boolean = Not AplicaNoAplica.Checked
|
||||||
|
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
|
||||||
|
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
|
||||||
|
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
|
||||||
|
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
|
||||||
|
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
|
||||||
|
|
||||||
|
|
||||||
|
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaNoAplica, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then
|
||||||
TipoTxt.Text = ""
|
TipoTxt.Text = ""
|
||||||
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
@@ -100,11 +115,18 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
BtnAgregarTiposDModal.Visible = False
|
BtnAgregarTiposDModal.Visible = False
|
||||||
BtnEditarTiposDModal.Visible = True
|
BtnEditarTiposDModal.Visible = True
|
||||||
CheckActiveSection.Visible = True
|
CheckActiveSection.Visible = True
|
||||||
saltoDeLinea.Visible = True
|
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||||
TipoTxt.Text = GvRow.DataKey("Tipo")
|
TipoTxt.Text = GvRow.DataKey("Tipo")
|
||||||
AplicaNoAplica.Checked = If(GvRow.DataKey("AplicaAsistencia") = "Aplica", True, False)
|
AplicaNoAplica.Checked = If(GvRow.DataKey("AplicaAsistencia") = "Aplica", True, False)
|
||||||
|
|
||||||
|
|
||||||
|
AplicaFalta.Checked = If(GvRow.DataKey("AplicaFalta") = "Aplica", True, False)
|
||||||
|
AplicaVacacion.Checked = If(GvRow.DataKey("AplicaVacacion") = "Aplica", True, False)
|
||||||
|
AplicaIncapacidad.Checked = If(GvRow.DataKey("AplicaIncapacidad") = "Aplica", True, False)
|
||||||
|
AplicaRetardo.Checked = If(GvRow.DataKey("AplicaRetardo") = "Aplica", True, False)
|
||||||
|
AplicaAguinaldo.Checked = If(GvRow.DataKey("AplicaAguinaldo") = "Aplica", True, False)
|
||||||
|
AplicaUtilidades.Checked = If(GvRow.DataKey("AplicaUtilidades") = "Aplica", True, False)
|
||||||
|
|
||||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||||
CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
|
CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
|
||||||
|
|
||||||
@@ -124,7 +146,17 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
||||||
Dim CveAsistenciasInasistencias As Integer = CveTipoAsisAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
|
Dim CveAsistenciasInasistencias As Integer = CveTipoAsisAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
|
||||||
|
|
||||||
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, AplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias) Then
|
|
||||||
|
|
||||||
|
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
|
||||||
|
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
|
||||||
|
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
|
||||||
|
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
|
||||||
|
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
|
||||||
|
|
||||||
|
|
||||||
|
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, AplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
|
||||||
|
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
|
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
|
||||||
|
|||||||
Reference in New Issue
Block a user