Nominas
This commit is contained in:
@@ -4071,6 +4071,44 @@ Public Class ClsNominas
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
#Region "CRUD_PersonalRefs"
|
||||||
|
Public Function PersonalCamposValoresGet(cveReferencia As Int32, cvePersonal As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_PersonalCamposValoresGet", CommandType.StoredProcedure)
|
||||||
|
addParameters("@CveReferencia", SqlDbType.Int, cveReferencia)
|
||||||
|
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||||
|
retorno = RunQuery("Ocurrió un error al obtener el PersonalRefs.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function PersonalCamposValoresAddUp(cveReferencia As Int32, cvePersonal As Int32, valor As Decimal) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_PersonalCamposValoresAddUp", CommandType.StoredProcedure)
|
||||||
|
addParameters("@CveReferencia", SqlDbType.Int, cveReferencia)
|
||||||
|
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||||
|
addParameters("@Valor", SqlDbType.Money, valor)
|
||||||
|
retorno = RunQuery("Ocurrió un error al actualizar el PersonalRefs.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function PersonalCamposValoresRemove(cveReferencia As Int32, cvePersonal As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_PersonalCamposValoresRemove", CommandType.StoredProcedure)
|
||||||
|
addParameters("@CveReferencia", SqlDbType.Int, cveReferencia)
|
||||||
|
addParameters("@CvePersonal", SqlDbType.Int, cvePersonal)
|
||||||
|
retorno = RunQuery("Ocurrió un error al eliminar el PersonalRefs.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function PersonalCamposGET() As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_PersonalCamposGET", CommandType.StoredProcedure)
|
||||||
|
retorno = RunQuery("Ocurrió un error al obtener el PersonalRefs.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -7599,6 +7599,31 @@ Public Class ClsRH
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Public Function ValidaFechaIngresoVSNominas(CvePersonal As Integer, CvePersonalAltas As Integer, CveEmpresa As Integer, FechaIngreso As String, FechaFin As String) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
Data = New DataTable
|
||||||
|
SqlDataAdapter("[PA_ValidaFechaIngresoVSNominas]")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@FechaIngreso", SqlDbType.VarChar).Value = FechaIngreso
|
||||||
|
.Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin
|
||||||
|
.Add("@CvePersonalAltas", SqlDbType.Int).Value = CvePersonalAltas
|
||||||
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
If Data.Rows.Count > 0 Then
|
||||||
|
Retorno = False
|
||||||
|
Else
|
||||||
|
Retorno = True
|
||||||
|
End If
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
Me.OnError("Ocurrió un error al guardar correos nominas", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar correos nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function NomBitacoraCorreoGet(CvePeriodo As Integer, CvePersonal As Integer, CveEmpresa As Integer) As Boolean
|
Public Function NomBitacoraCorreoGet(CvePeriodo As Integer, CvePersonal As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .lblconcepto {
|
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .lblconcepto {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.GVGetMovtoPermanenteRep tr.cvetipo0 td .lblcodigo {
|
.GVGetMovtoPermanenteRep tr.cvetipo0 td .lblcodigo {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -51,8 +52,9 @@
|
|||||||
.GVGetMovtoPermanenteRep td:nth-child(14) {
|
.GVGetMovtoPermanenteRep td:nth-child(14) {
|
||||||
text-align: right
|
text-align: right
|
||||||
}
|
}
|
||||||
|
|
||||||
.GVGetMovtoPermanenteRep td:nth-child(14) {
|
.GVGetMovtoPermanenteRep td:nth-child(14) {
|
||||||
white-space:nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -86,8 +88,8 @@
|
|||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1 compoonenlabel" style="max-width: 65px; display:none;">Tipo: </label>
|
<label class="col-md-1 compoonenlabel" style="max-width: 65px; display: none;">Tipo: </label>
|
||||||
<div class="col-md-1" style=" display:none;">
|
<div class="col-md-1" style="display: none;">
|
||||||
<asp:DropDownList ID="DDlTipo" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
<asp:DropDownList ID="DDlTipo" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="Movimientos Permanentes" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Movimientos Permanentes" Value="1"></asp:ListItem>
|
||||||
@@ -95,16 +97,16 @@
|
|||||||
<asp:ListItem Text="Infonavit" Value="3"></asp:ListItem>
|
<asp:ListItem Text="Infonavit" Value="3"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 compoonenlabel" style="max-width: 65px; display:none;">Saldo: </label>
|
<label class="col-md-1 compoonenlabel" style="max-width: 65px; display: none;">Saldo: </label>
|
||||||
<div class="col-md-1" style=" display:none;">
|
<div class="col-md-1" style="display: none;">
|
||||||
<asp:DropDownList ID="DDLSaldo" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
<asp:DropDownList ID="DDLSaldo" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="Pendiente" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Pendiente" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Pagado" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Pagado" Value="2"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 compoonenlabel" style="max-width: 65px; display:none;">Estatus: </label>
|
<label class="col-md-1 compoonenlabel" style="max-width: 65px; display: none;">Estatus: </label>
|
||||||
<div class="col-md-1" style=" display:none;">
|
<div class="col-md-1" style="display: none;">
|
||||||
<asp:DropDownList ID="DDLEstatus" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
<asp:DropDownList ID="DDLEstatus" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
|
||||||
@@ -186,12 +188,12 @@
|
|||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
<asp:TemplateField HeaderText="">
|
<asp:TemplateField HeaderText="">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblcodigo" runat="server" Text='<%# Eval("Codigo")%>'> </asp:Label>
|
<asp:HyperLink ID="lblcodigo" runat="server" Text='<%# Eval("Codigo")%>' NavigateUrl='<%# string.Format("/RH/Personal.aspx?CvePersonal={0}",Eval("CvePersonal"))%>' ></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Nombre Completo">
|
<asp:TemplateField HeaderText="Nombre Completo">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblnombreCompleto" CssClass="lblcodigo" runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
|
<asp:HyperLink ID="lblnombreCompleto" CssClass="lblcodigo" runat="server" Text='<%# Eval("NombreCompleto")%>' NavigateUrl='<%# string.Format("/RH/Personal.aspx?CvePersonal={0}",Eval("CvePersonal"))%>' ></asp:HyperLink>
|
||||||
<asp:Label ID="lblconcepto" CssClass="lblconcepto" runat="server" Text='<%# Eval("Concepto")%>'> </asp:Label>
|
<asp:Label ID="lblconcepto" CssClass="lblconcepto" runat="server" Text='<%# Eval("Concepto")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -211,7 +213,7 @@
|
|||||||
<asp:Label ID="lblsaldo" runat="server" Text='<%# Eval("Acumulado","{0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblsaldo" runat="server" Text='<%# Eval("Acumulado","{0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%-- <asp:TemplateField HeaderText="Tipo">
|
<%-- <asp:TemplateField HeaderText="Tipo">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbltipo" runat="server" Text='<%# Eval("Tipo")%>'> </asp:Label>
|
<asp:Label ID="lbltipo" runat="server" Text='<%# Eval("Tipo")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using ClosedXML.Excel;
|
||||||
using Extensiones;
|
using Extensiones;
|
||||||
|
|
||||||
public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||||
@@ -60,7 +63,7 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
|||||||
RcveEstatus = Request["cveEstatus"] != null ? Convert.ToInt32(Request["cveEstatus"]) : -1;
|
RcveEstatus = Request["cveEstatus"] != null ? Convert.ToInt32(Request["cveEstatus"]) : -1;
|
||||||
RcveConcepto = Request["cveConcepto"] != null ? Convert.ToInt32(Request["cveConcepto"]) : -1;
|
RcveConcepto = Request["cveConcepto"] != null ? Convert.ToInt32(Request["cveConcepto"]) : -1;
|
||||||
fechaInicio = DateTime.Now.ToString("01/MM/yyyy");
|
fechaInicio = DateTime.Now.ToString("01/MM/yyyy");
|
||||||
fechaFin=DateTime.Now.ToString("01/MM/yyyy").ToDateTime().AddMonths(1).AddDays(1).ToString("01/MM/yyyy");
|
fechaFin = DateTime.Now.ToString("01/MM/yyyy").ToDateTime().AddMonths(1).AddDays(1).ToString("01/MM/yyyy");
|
||||||
CargaCombos();
|
CargaCombos();
|
||||||
cargardatos();
|
cargardatos();
|
||||||
|
|
||||||
@@ -85,11 +88,11 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
|||||||
}
|
}
|
||||||
DDLConcepto.DataBind();
|
DDLConcepto.DataBind();
|
||||||
}
|
}
|
||||||
DDlPersonal.SelectedValueExist( RcvePersonal.ToString());
|
DDlPersonal.SelectedValueExist(RcvePersonal.ToString());
|
||||||
DDlTipo.SelectedValueExist( RcveTipo.ToString());
|
DDlTipo.SelectedValueExist(RcveTipo.ToString());
|
||||||
DDLSaldo.SelectedValueExist( RcveSaldo.ToString());
|
DDLSaldo.SelectedValueExist(RcveSaldo.ToString());
|
||||||
DDLEstatus.SelectedValueExist( RcveEstatus.ToString());
|
DDLEstatus.SelectedValueExist(RcveEstatus.ToString());
|
||||||
DDLConcepto.SelectedValueExist( RcveConcepto.ToString());
|
DDLConcepto.SelectedValueExist(RcveConcepto.ToString());
|
||||||
}
|
}
|
||||||
protected void cargardatos()
|
protected void cargardatos()
|
||||||
{
|
{
|
||||||
@@ -97,7 +100,7 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
|||||||
{
|
{
|
||||||
//string fechaInicio = "";
|
//string fechaInicio = "";
|
||||||
//string fechaFin = "";
|
//string fechaFin = "";
|
||||||
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio, fechaFin);
|
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio.ToDateTime().ToString("yyyy-MM-dd"), fechaFin.ToDateTime().ToString("yyyy-MM-dd"));
|
||||||
GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados;
|
GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados;
|
||||||
GVGetMovtoPermanenteRep.DataBind();
|
GVGetMovtoPermanenteRep.DataBind();
|
||||||
|
|
||||||
@@ -171,7 +174,84 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
|||||||
|
|
||||||
protected void LnkFormatoxls_Click(object sender, EventArgs e)
|
protected void LnkFormatoxls_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GVGetMovtoPermanenteRep.ExportToExcelX("Movimientos Permanente");
|
using (ClsNominas ObjGetM = new ClsNominas())
|
||||||
|
{
|
||||||
|
//string fechaInicio = "";
|
||||||
|
//string fechaFin = "";
|
||||||
|
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio.ToDateTime().ToString("yyyy-MM-dd"), fechaFin.ToDateTime().ToString("yyyy-MM-dd"));
|
||||||
|
ExportarExcel(ObjGetM.DtResultados);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void ExportarExcel(DataTable dt)
|
||||||
|
{
|
||||||
|
using (var wb = new XLWorkbook())
|
||||||
|
{
|
||||||
|
var ws = wb.Worksheets.Add("Descuentos");
|
||||||
|
|
||||||
|
// Encabezados
|
||||||
|
ws.Cell(1, 1).Value = "Código";
|
||||||
|
ws.Cell(1, 2).Value = "Nombre Completo";
|
||||||
|
ws.Cell(1, 3).Value = "Descuento Acordado";
|
||||||
|
ws.Cell(1, 4).Value = "Descuento Aplicado";
|
||||||
|
ws.Cell(1, 5).Value = "Acumulado";
|
||||||
|
|
||||||
|
// Estilo del encabezado
|
||||||
|
var headerRange = ws.Range("A1:E1");
|
||||||
|
headerRange.Style.Fill.BackgroundColor = XLColor.LightGray;
|
||||||
|
headerRange.Style.Font.Bold = true;
|
||||||
|
headerRange.Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||||
|
|
||||||
|
int row = 2;
|
||||||
|
foreach (DataRow dr in dt.Rows)
|
||||||
|
{
|
||||||
|
int cveTipo = Convert.ToInt32(dr["CveTipo"]);
|
||||||
|
|
||||||
|
string codigo = dr["Codigo"].ToString();
|
||||||
|
string nombre = cveTipo == 0 ? dr["Concepto"].ToString() : dr["NombreCompleto"].ToString();
|
||||||
|
decimal valor = Convert.ToDecimal(dr["Valor"]);
|
||||||
|
decimal aplicado = Convert.ToDecimal(dr["MontoAplicado"]);
|
||||||
|
decimal acumulado = Convert.ToDecimal(dr["Acumulado"]);
|
||||||
|
|
||||||
|
ws.Cell(row, 1).Value = codigo;
|
||||||
|
ws.Cell(row, 2).Value = nombre;
|
||||||
|
ws.Cell(row, 3).Value = valor;
|
||||||
|
ws.Cell(row, 4).Value = aplicado;
|
||||||
|
ws.Cell(row, 5).Value = acumulado;
|
||||||
|
|
||||||
|
// Formato numérico a columnas de dinero
|
||||||
|
ws.Cell(row, 3).Style.NumberFormat.Format = "#,##0.00";
|
||||||
|
ws.Cell(row, 4).Style.NumberFormat.Format = "#,##0.00";
|
||||||
|
ws.Cell(row, 5).Style.NumberFormat.Format = "#,##0.00";
|
||||||
|
|
||||||
|
// Color especial si CveTipo = 0
|
||||||
|
if (cveTipo == 0)
|
||||||
|
{
|
||||||
|
var range = ws.Range(row, 1, row, 5);
|
||||||
|
range.Style.Fill.BackgroundColor = XLColor.FromArgb(221, 221, 221);
|
||||||
|
range.Style.Font.Bold = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajustar columnas al contenido
|
||||||
|
ws.Columns().AdjustToContents();
|
||||||
|
|
||||||
|
// Exportar el archivo
|
||||||
|
using (MemoryStream ms = new MemoryStream())
|
||||||
|
{
|
||||||
|
wb.SaveAs(ms);
|
||||||
|
Response.Clear();
|
||||||
|
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||||
|
Response.AddHeader("content-disposition", "attachment;filename=Movimietnospermanenetea.xlsx");
|
||||||
|
Response.BinaryWrite(ms.ToArray());
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -70,6 +70,9 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkMostrarCamposValores" OnClick="LnkMostrarCamposValor_Click" Visible="true" runat="server"> <i class="fa fa-sticky-note"></i> Mostrar Campos Valores</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpBuzon" runat="server">
|
<asp:UpdatePanel ID="UpBuzon" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -1691,6 +1694,86 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
|
||||||
|
<div id="DModalPersonalRefs" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModalPers" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content" >
|
||||||
|
<div class="modal-header ">
|
||||||
|
<h4 class="modal-title"><asp:Literal ID="ltlPerstitulo" runat="server"> </asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:Panel runat="server" ID="PanelMostrarpersonalcampos">
|
||||||
|
<div class="portlet light xspadding bordered " id="pnlListrefs">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption ">
|
||||||
|
<i class="icon-pin font-yellow-gold"></i>
|
||||||
|
<span class="caption-subject font-yellow-gold bold uppercase">Referenca Nomina</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="LnkAgregarPersonalRefs" OnClick="LnkAgregarPers_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body ">
|
||||||
|
<asp:GridView ID="GVPersonalRefs" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" ShowHeaderWhenEmpty ="True"
|
||||||
|
datakeynames="CveReferencia,CvePersonal,Valor">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Referencia">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblreferencia" runat="server" Text='<%# Eval("Referencia")%>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Valor">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblvalor" runat="server" Text='<%# Eval("Valor")%>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="36">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEliminarPers" runat="server" OnClick="LnkEliminarPers_Click" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el PersonalRefs?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</asp:Panel>
|
||||||
|
<asp:Panel runat="server" ID="PanelADDpersonalcampos">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 truncate ">Referencia</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlPersreferencia" CssClass="form-control input-sm select2me " runat="server" DataTextField="Referencia" DataValueField="CveReferencia" style="width: 100%" ></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 truncate ">Valor</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtPersvalor" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvPersvalor" runat="server" ControlToValidate="TxtPersvalor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario, por favor ingréselo." ValidationGroup="VGMPers"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VcoPersvalor" runat="server" HighlightCssClass="vco" TargetControlID="RfvPersvalor"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer ">
|
||||||
|
<div class="modal-btn">
|
||||||
|
<asp:Button ID="BtnPersADD" OnClick="BtnPersADD_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGMPers" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpMovtosPermanentes" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpMovtosPermanentes" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|||||||
@@ -971,7 +971,7 @@ Partial Class RH_Personal
|
|||||||
CargaPaises()
|
CargaPaises()
|
||||||
CargaRegistroPatronal()
|
CargaRegistroPatronal()
|
||||||
CargaOutSourcing()
|
CargaOutSourcing()
|
||||||
|
CargaDDlPersonalRefsReference()
|
||||||
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
|
If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
|
||||||
ViewState("CvePersonal") = Request("CvePersonal")
|
ViewState("CvePersonal") = Request("CvePersonal")
|
||||||
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
|
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
|
||||||
@@ -1007,6 +1007,7 @@ Partial Class RH_Personal
|
|||||||
CargaGvBitacora()
|
CargaGvBitacora()
|
||||||
CarcaConceptosNomina()
|
CarcaConceptosNomina()
|
||||||
CargaFonacot()
|
CargaFonacot()
|
||||||
|
CargaPersonalRefs()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ValidaDeudorAcreedor()
|
ValidaDeudorAcreedor()
|
||||||
@@ -7320,8 +7321,14 @@ Partial Class RH_Personal
|
|||||||
strfin = String.Format(",[FechaFin]='{0:yyyy-MM-dd}'", fechafin)
|
strfin = String.Format(",[FechaFin]='{0:yyyy-MM-dd}'", fechafin)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
Dim finicio As String = TxtFechaInicioUA.Text.ToDateTime().ToString("yyyy-MM-dd")
|
||||||
|
Dim ffin As String = TxtFechaFinUA.Text.ToDateTime().ToString("yyyy-MM-dd")
|
||||||
Using objrh As New ClsRH()
|
Using objrh As New ClsRH()
|
||||||
If (objrh.PersonalAltasUpFechas(CvePersonalAltas, TxtFechaInicioUA.Text.ToDateTime().ToString("yyyy-MM-dd"), TxtFechaFinUA.Text.ToDateTime().ToString("yyyy-MM-dd"), CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
|
If Not (objrh.ValidaFechaIngresoVSNominas(CvePersonal, CvePersonalAltas, 0, finicio, ffin)) Then
|
||||||
|
Alert("La fecha de ingreso o de fin no puede ser modificada, ya que existen registros de nómina autorizados que se encuentran dentro del periodo definido.", TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
End If
|
||||||
|
If (objrh.PersonalAltasUpFechas(CvePersonalAltas, finicio, ffin, CvePersonal, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)) Then
|
||||||
If objrh.GetPersonalAltas(CvePersonal) Then
|
If objrh.GetPersonalAltas(CvePersonal) Then
|
||||||
GvPersonalAltas.DataSource = objrh.DtResultados
|
GvPersonalAltas.DataSource = objrh.DtResultados
|
||||||
GvPersonalAltas.DataBind()
|
GvPersonalAltas.DataBind()
|
||||||
@@ -8307,7 +8314,70 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub CargaPersonalRefs()
|
||||||
|
Dim ObjPers As New ClsNominas()
|
||||||
|
ObjPers.PersonalCamposValoresGet(-1, CvePersonal)
|
||||||
|
GVPersonalRefs.DataSource = ObjPers.DtResultados
|
||||||
|
ObjPers.Dispose()
|
||||||
|
GVPersonalRefs.DataBind()
|
||||||
|
UPModalPers.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub CargaDDlPersonalRefsReference()
|
||||||
|
Dim ObjPers As New ClsNominas()
|
||||||
|
ObjPers.PersonalCamposGET()
|
||||||
|
DdlPersreferencia.DataSource = ObjPers.DtResultados
|
||||||
|
ObjPers.Dispose()
|
||||||
|
DdlPersreferencia.DataBind()
|
||||||
|
UPModalPers.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LimpiaPersonalRefs()
|
||||||
|
DdlPersreferencia.SelectedIndex = 0
|
||||||
|
TxtPersvalor.Text = ""
|
||||||
|
UPModalPers.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkMostrarCamposValor_Click(sender As Object, e As EventArgs)
|
||||||
|
ltlPerstitulo.Text = "Campos valores"
|
||||||
|
LimpiaPersonalRefs()
|
||||||
|
|
||||||
|
RegistraScript("$('#DModalPersonalRefs').modal()")
|
||||||
|
BtnPersADD.Visible = False
|
||||||
|
PanelMostrarpersonalcampos.Visible = True
|
||||||
|
PanelADDpersonalcampos.Visible = False
|
||||||
|
UPModalPers.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkAgregarPers_Click(sender As Object, e As EventArgs)
|
||||||
|
'RegistraScript("$('#DModalPersonalRefs').modal()")
|
||||||
|
ltlPerstitulo.Text = "Agregar Campos Valores"
|
||||||
|
LimpiaPersonalRefs()
|
||||||
|
BtnPersADD.Visible = True
|
||||||
|
PanelADDpersonalcampos.Visible = True
|
||||||
|
PanelMostrarpersonalcampos.Visible = False
|
||||||
|
UPModalPers.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnPersADD_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim cveReferencia As Int32 = DdlPersreferencia.SelectedValue.ToEntero()
|
||||||
|
Dim valor As Decimal = TxtPersvalor.Text.ToDecimal()
|
||||||
|
Dim ObjPers As New ClsNominas()
|
||||||
|
Dim Continuar As Boolean = ObjPers.PersonalCamposValoresAddUp(cveReferencia, CvePersonal, valor)
|
||||||
|
ObjPers.Dispose()
|
||||||
|
If (Continuar) Then
|
||||||
|
LimpiaPersonalRefs()
|
||||||
|
UPModalPers.Update()
|
||||||
|
Alert("El campo valor se ha agregado")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkEliminarPers_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
|
Dim CcveReferencia As Integer = gvRow.DataKey("CveReferencia").ToEntero()
|
||||||
|
Dim ObjPers As New ClsNominas()
|
||||||
|
Dim Continuar As Boolean = ObjPers.PersonalCamposValoresRemove(CcveReferencia, CvePersonal)
|
||||||
|
ObjPers.Dispose()
|
||||||
|
If (Continuar) Then
|
||||||
|
CargaPersonalRefs()
|
||||||
|
Alert("El campo valor se ha eliminado")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
'Protected Sub ChkPagoElectronicoGrupos_CheckedChanged(sender As Object, e As EventArgs)
|
'Protected Sub ChkPagoElectronicoGrupos_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
' If ChkPagoElectronicoGrupos.Checked Then
|
' If ChkPagoElectronicoGrupos.Checked Then
|
||||||
|
|||||||
Reference in New Issue
Block a user