This commit is contained in:
@@ -172,6 +172,25 @@ Public Class ClsNominas
|
||||
|
||||
#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
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure)
|
||||
@@ -1890,6 +1909,102 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
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"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -131,7 +131,8 @@ Public Class ClsRH
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
|
||||
@@ -143,6 +144,12 @@ Public Class ClsRH
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.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
|
||||
|
||||
Try
|
||||
@@ -161,7 +168,8 @@ Public Class ClsRH
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
|
||||
@@ -172,6 +180,12 @@ Public Class ClsRH
|
||||
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.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
|
||||
|
||||
Try
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<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 class="modal-footer">
|
||||
|
||||
@@ -68,15 +68,15 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HypModalNomina" data-target="#DModalNominas" data-toggle="modal" runat="server">Cargar Nomina</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server">Tablas</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkListaRaya" OnClick="LnkListaRaya_Click" runat="server">Lista de Raya</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkListaRaya" OnClick="LnkListaRaya_Click" runat="server">Lista de Raya</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -782,7 +782,157 @@
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabMovtosPermanentes" runat="server" HeaderText="Movimientos Permanentes">
|
||||
<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>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
@@ -810,7 +960,7 @@
|
||||
<div class="modal-body">
|
||||
|
||||
<ajax:TabContainer ID="TabTablas" runat="server" Width="100%">
|
||||
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible ="false">
|
||||
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="gvAntigudad" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -820,18 +970,18 @@
|
||||
<asp:GridView ID="GVFactorDesctInfonavit" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible ="false">
|
||||
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVFactorSDI" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible ="false">
|
||||
|
||||
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVFiniquito" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible ="false">
|
||||
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVRepartoMonetario" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -851,7 +1001,7 @@
|
||||
<asp:GridView ID="GVInfonavitSegViv" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible ="false">
|
||||
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVVigISRAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -861,7 +1011,7 @@
|
||||
<asp:GridView ID="GVVigISRMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible ="false">
|
||||
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVVigSubEmpAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -899,7 +1049,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
|
||||
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
|
||||
-No se debe editar el nombre de la hoja 'Nomina'.<br />
|
||||
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
|
||||
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />
|
||||
|
||||
@@ -93,6 +93,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
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
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -912,6 +923,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LblEmpleado.Text = Nombre;
|
||||
TabPersonal.ActiveTabIndex = 0;
|
||||
mostrarConceptos();
|
||||
pnlAddupMovto.Visible = false;
|
||||
CargaMovtoPermanente();
|
||||
RegistraScript("$('#ModalConceptos').modal();");
|
||||
}
|
||||
private void mostrarConceptos()
|
||||
@@ -1461,7 +1474,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string strFechaFin = "";
|
||||
string strTipo = "";
|
||||
string strPeriodoNum = "";
|
||||
string strUbicacion = string.Format ("{0}, {1}, {2}, {3}",UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado );
|
||||
string strUbicacion = string.Format("{0}, {1}, {2}, {3}", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado);
|
||||
string strRegPatImss = "";
|
||||
string strRFC = UsuarioActual.Empresa.RFC;
|
||||
string strfecha = DateTime.Now.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
|
||||
@@ -1472,11 +1485,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DataRow rperiodo = dtPeriodos.FiltroPrimero(string.Format("CvePeriodo = {0}", CvePeriodo));
|
||||
if (rperiodo != null)
|
||||
{
|
||||
strFechaInicio =string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]);
|
||||
strFechaInicio = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]);
|
||||
strFechaFin = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaFin"]);
|
||||
strPeriodoNum = rperiodo["Numero"].ToString();
|
||||
|
||||
strTipo = DdlTipoPeriodo.SelectedItem.Text ;
|
||||
strTipo = DdlTipoPeriodo.SelectedItem.Text;
|
||||
}
|
||||
listaTags.Add(new TagsDocumentos("[Empresa]", strEmpresa));
|
||||
listaTags.Add(new TagsDocumentos("[FechaInicio]", strFechaInicio));
|
||||
@@ -1526,7 +1539,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string SalarioDiariop = "";
|
||||
string FechaIngreso = "", Nombre = "", DiasLaborados = "";*/
|
||||
|
||||
paragraphh = new GemBox.Document.Paragraph(document,string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh);
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh);
|
||||
paragraphh.ParagraphFormat.Style = styilostrong;
|
||||
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"])); cell.Blocks.Add(paragraphh);
|
||||
@@ -1625,7 +1638,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero();
|
||||
importe = string.Format("${0:N2}", rowconcept["Importe"]);
|
||||
valor = string.Format("{0:#,###.##}", rowconcept["Valor"]);
|
||||
|
||||
|
||||
Concepto = "";
|
||||
|
||||
rowconcept = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", CveConcepto));
|
||||
@@ -1668,7 +1681,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
CveConcepto = 0; Concepto = ""; importe = ""; Codigo = "";valor = "";
|
||||
CveConcepto = 0; Concepto = ""; importe = ""; Codigo = ""; valor = "";
|
||||
|
||||
|
||||
rowconcept = dtempleadosConceptos.FiltroPrimero(string.Format("CvePersonal={0} AND Tipo =2 AND Fila ={1}", CvePersonal, cindex));
|
||||
@@ -2122,7 +2135,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("{0:N0}", dtempleados.COUNT("CvePersonal", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
|
||||
paragraphh.ParagraphFormat.Style = styilo;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
|
||||
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
|
||||
@@ -2556,7 +2569,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//basura para espacio
|
||||
{
|
||||
rowx = new GemBox.Document.Tables.TableRow(document);
|
||||
tconeptos.Rows.Add(rowx);
|
||||
tconeptos.Rows.Add(rowx);
|
||||
{
|
||||
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
|
||||
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
|
||||
@@ -2852,4 +2865,164 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
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()
|
||||
utilimporteAnt = TxtPA_NimporteA.Text.ToDouble()
|
||||
|
||||
Dim objnom As New ClsNominas()
|
||||
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
|
||||
DTUtilidades = objnom.DtResultados
|
||||
objnom.Dispose()
|
||||
Using objnom As New ClsNominas()
|
||||
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
|
||||
DTUtilidades = objnom.DtResultados
|
||||
End Using
|
||||
|
||||
cargaEjercicio(DTUtilidades)
|
||||
LnkAutorizarModal.Visible = True
|
||||
@@ -155,7 +155,7 @@ Partial Class Nomina_ReportePTU
|
||||
If Not IsNothing(rowc) Then
|
||||
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
|
||||
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
|
||||
If CveConcepto < 1 Then
|
||||
continuar = False
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Catálogo de Tipos de Asistencias/Inasistencias
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Asistencia/Inacistencia"></asp:LinkButton>
|
||||
@@ -21,11 +21,9 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -33,7 +31,7 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<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>
|
||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
@@ -58,9 +56,38 @@
|
||||
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<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>
|
||||
</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">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
|
||||
@@ -80,7 +107,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<%--<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />--%>
|
||||
</ItemTemplate>
|
||||
@@ -121,21 +148,48 @@
|
||||
<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>
|
||||
<label for="TipoTxt">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<div ID="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="AplicaNoAplica">Aplica Asistencia:</label>
|
||||
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="display:none;">
|
||||
<label for="AplicaFalta">Aplica Falta:</label><br />
|
||||
<asp:CheckBox ID="AplicaFalta" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</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>
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
<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>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -6,7 +6,7 @@ Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class RH_CatAsistenciasInasistencias
|
||||
Inherits ClsPaginas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property PuedeEditar As Boolean
|
||||
@@ -63,7 +63,13 @@ Partial Class RH_CatAsistenciasInasistencias
|
||||
BtnEditarTiposDModal.Visible = False
|
||||
BtnAgregarTiposDModal.Visible = True
|
||||
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 = ""
|
||||
UpModalTiposD.Update()
|
||||
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"
|
||||
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 = ""
|
||||
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
@@ -100,11 +115,18 @@ Partial Class RH_CatAsistenciasInasistencias
|
||||
BtnAgregarTiposDModal.Visible = False
|
||||
BtnEditarTiposDModal.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
|
||||
TipoTxt.Text = GvRow.DataKey("Tipo")
|
||||
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)
|
||||
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 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
|
||||
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
|
||||
|
||||
Reference in New Issue
Block a user