This commit is contained in:
@@ -3052,6 +3052,27 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function GetAsistenciabetweendate(CveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DTSet = New DataSet()
|
||||
DataAdapter("PA_RH_AsistenciaBetweenDates", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||
End With
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener la asistencia de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener la asistencia de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||
|
||||
@@ -7180,6 +7180,31 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Function UpPersonalSupervisorMasiva(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpSupervisorMasiva)) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
|
||||
If registros IsNot Nothing AndAlso registros.Count > 0 Then
|
||||
xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("CveUsuario", x.CveUsuario), New System.Xml.Linq.XElement("CveCliente", x.CveCliente))))
|
||||
End If
|
||||
Data = New DataTable
|
||||
SqlDataAdapter("PA_RH_PersonalSupervisorMasivaUP")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString()
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al guardar los supervisores.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los supervisores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public msgsError As New StringBuilder()
|
||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
@@ -7236,3 +7261,8 @@ Public Class RequestUpAsistenciaDetalle
|
||||
Public Property CveSubProyecto As Integer
|
||||
Public Property Motivo As String
|
||||
End Class
|
||||
Public Class RequestUpSupervisorMasiva
|
||||
Public Property CvePersonal As Integer
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property CveCliente As Integer
|
||||
End Class
|
||||
@@ -1016,7 +1016,7 @@ Partial Class PopUpVerFactura
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
|
||||
Dim SerieFolio As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
Dim LugarFecha As String = ""
|
||||
|
||||
@@ -22,6 +22,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
get { return 5; }
|
||||
}
|
||||
|
||||
private DateTime FechaInicioPeriodo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FechaInicioPeriodo"] == null) { return DateTime.Now; }
|
||||
else { return (DateTime)ViewState["FechaInicioPeriodo"]; }
|
||||
}
|
||||
|
||||
set { ViewState["FechaInicioPeriodo"] = value; }
|
||||
}
|
||||
private DateTime FechaFinPeriodo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["FechaFinPeriodo"] == null) { return DateTime.Now.AddDays(1); }
|
||||
else { return (DateTime)ViewState["FechaFinPeriodo"]; }
|
||||
}
|
||||
|
||||
set { ViewState["FechaFinPeriodo"] = value; }
|
||||
}
|
||||
|
||||
private DataTable dtNomConceptos
|
||||
{
|
||||
get
|
||||
@@ -422,7 +444,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
dtempleados = null;
|
||||
dtConceptos = null;
|
||||
DataTable dtPeriodo = new DataTable();
|
||||
DataTable dtasistencia = new DataTable();
|
||||
LnkAutorizar.Visible = false;
|
||||
Estatus = 5;
|
||||
if (FiltCvePeriodo > 0)
|
||||
@@ -438,6 +459,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePrePolizaProvisionAsimilados = drow["CvePrePolizaAsimilables"].ToString().ToEntero();
|
||||
int CvePrePolizaProrrateo = drow["CvePrePolizaProrrateo"].ToString().ToEntero();
|
||||
|
||||
|
||||
FechaInicioPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
||||
FechaFinPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
|
||||
|
||||
//LnkConceptoEmpleado.Visible = (Estatus == 1);
|
||||
LnkRegistrarProvision.Visible = (Estatus >= 2);//&& (CvePrePolizaProvision <= 0 || UsuarioActual.CveUsuario == 100);
|
||||
LnkRegistrarProvision.Text = CvePrePolizaProvision <= 0 ? "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Registrar provisión" : "<i class=\"fa fa-thumbs-up\" aria-hidden=\"true\" ></i>Regenerar provisión";
|
||||
@@ -466,7 +491,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
dtPeriodo = objnom.DTSetResultados.Tables[1];
|
||||
dtasistencia = objnom.DTSetResultados.Tables[2];
|
||||
//dtasistencia = objnom.DTSetResultados.Tables[2];
|
||||
CvePeriodoSeleccionado = FiltCvePeriodo;
|
||||
continuar = true;
|
||||
}
|
||||
@@ -826,74 +851,87 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GvNominas.DataSource = null;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
if (cargaasistencia)
|
||||
{
|
||||
if (dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
||||
{
|
||||
|
||||
DateTime FechaInicio = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
|
||||
DateTime FechaFin = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
|
||||
StringBuilder gvasistencia = new StringBuilder();
|
||||
gvasistencia.Append("<div><table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD gvasistencia \" data-rows=\"1\" data-heighterror=\"360\"><tbody>");
|
||||
if (true)
|
||||
{
|
||||
DateTime fecha = FechaInicio;
|
||||
|
||||
gvasistencia.Append("<tr class=\"Titulos ADtr\">");
|
||||
gvasistencia.Append("<th>Nombre</th>");
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
gvasistencia.AppendFormat("<th>{0:dd/MM/yyyy}</th>", fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
string tipo = "";
|
||||
foreach (DataRow rempl in dtempleados.FiltraParametros("CvePersonal>0").Rows)
|
||||
{
|
||||
int CvePersonal = rempl["CvePersonal"].ToString().ToEntero();
|
||||
string nombre = rempl["Nombre"].ToString();
|
||||
string Codigo = rempl["Codigo"].ToString();
|
||||
DateTime fecha = FechaInicio; int HorasDobles, HorasTriples;
|
||||
gvasistencia.Append("<tr>");
|
||||
gvasistencia.AppendFormat("<td><a class=\"Texto sline\" href=\"/RH/Personal.aspx?CvePersonal={0}\"><span style=\"display:inline-block;min-width:31px;\">{2}</span> <span style=\"display:inline-block;\">{1}</span></a></td>", CvePersonal, nombre, Codigo);
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
DataRow drow = dtasistencia.FiltroPrimero(string.Format("Fecha='{0:yyyy/MM/dd}' AND CvePersonal={1}", fecha, CvePersonal));
|
||||
tipo = "-";
|
||||
if (drow != null)
|
||||
{
|
||||
tipo = string.Format("{0} ({1}%)", drow["Tipo"], drow["PorcentajePago"]);
|
||||
HorasDobles = drow["HorasDobles"].ToString().ToEntero();
|
||||
HorasTriples = drow["HorasTriples"].ToString().ToEntero();
|
||||
if (HorasDobles > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas dobles", tipo, HorasDobles);
|
||||
}
|
||||
if (HorasTriples > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas triple", tipo, HorasTriples);
|
||||
}
|
||||
drow.Delete();
|
||||
}
|
||||
gvasistencia.AppendFormat("<td> <a onclick=\"openasis({1},'{2}')\"> {0} </a></td>", tipo, CvePersonal, fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
gvasistencia.Append("</tbody></table></div>");
|
||||
ltlGvAsistencia.Text = gvasistencia.ToString();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (cargaasistencia && dtPeriodo != null && dtPeriodo.Rows.Count > 0)
|
||||
{
|
||||
cargarasistencia();
|
||||
}
|
||||
if (dtempleados != null)
|
||||
{
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
|
||||
LnkCancelarNomina.Visible = (dtempleados.COUNT("CvePersonal", "CvePersonal > 0 AND NomAutorizado =1 AND SeTimbro=0") > 0);
|
||||
}
|
||||
UpDatos.Update();
|
||||
}
|
||||
public void cargarasistencia()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
DateTime FechaInicio = FechaInicioPeriodo;
|
||||
DateTime FechaFin = FechaFinPeriodo;
|
||||
DataTable dtasistencia;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
objnom.GetAsistenciabetweendate(UsuarioActual.CveEmpresa, FechaInicio, FechaFin);
|
||||
dtasistencia = objnom.DtResultados;
|
||||
}
|
||||
StringBuilder gvasistencia = new StringBuilder();
|
||||
gvasistencia.Append("<div><table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD gvasistencia \" data-rows=\"1\" data-heighterror=\"360\"><tbody>");
|
||||
if (true)
|
||||
{
|
||||
DateTime fecha = FechaInicio;
|
||||
|
||||
gvasistencia.Append("<tr class=\"Titulos ADtr\">");
|
||||
gvasistencia.Append("<th>Nombre</th>");
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
gvasistencia.AppendFormat("<th>{0:dd/MM/yyyy}</th>", fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
string tipo = "";
|
||||
foreach (DataRow rempl in dtempleados.FiltraParametros("CvePersonal>0").Rows)
|
||||
{
|
||||
int CvePersonal = rempl["CvePersonal"].ToString().ToEntero();
|
||||
string nombre = rempl["Nombre"].ToString();
|
||||
string Codigo = rempl["Codigo"].ToString();
|
||||
DateTime fecha = FechaInicio; int HorasDobles, HorasTriples;
|
||||
gvasistencia.Append("<tr>");
|
||||
gvasistencia.AppendFormat("<td><a class=\"Texto sline\" href=\"/RH/Personal.aspx?CvePersonal={0}\"><span style=\"display:inline-block;min-width:31px;\">{2}</span> <span style=\"display:inline-block;\">{1}</span></a></td>", CvePersonal, nombre, Codigo);
|
||||
while (fecha <= FechaFin)
|
||||
{
|
||||
DataRow drow = dtasistencia.FiltroPrimero(string.Format("Fecha='{0:yyyy/MM/dd}' AND CvePersonal={1}", fecha, CvePersonal));
|
||||
tipo = "-";
|
||||
if (drow != null)
|
||||
{
|
||||
tipo = string.Format("{0} ({1}%)", drow["Tipo"], drow["PorcentajePago"]);
|
||||
HorasDobles = drow["HorasDobles"].ToString().ToEntero();
|
||||
HorasTriples = drow["HorasTriples"].ToString().ToEntero();
|
||||
if (HorasDobles > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas dobles", tipo, HorasDobles);
|
||||
}
|
||||
if (HorasTriples > 0)
|
||||
{
|
||||
|
||||
tipo = string.Format("{0}<br/>{1} horas triple", tipo, HorasTriples);
|
||||
}
|
||||
drow.Delete();
|
||||
}
|
||||
gvasistencia.AppendFormat("<td> <a onclick=\"openasis({1},'{2}')\"> {0} </a></td>", tipo, CvePersonal, fecha);
|
||||
fecha = fecha.AddDays(1);
|
||||
}
|
||||
gvasistencia.Append("</tr>");
|
||||
}
|
||||
gvasistencia.Append("</tbody></table></div>");
|
||||
ltlGvAsistencia.Text = gvasistencia.ToString();
|
||||
|
||||
|
||||
}
|
||||
private void setGVNominas()
|
||||
{
|
||||
@@ -1240,7 +1278,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
|
||||
|
||||
|
||||
DdlMotivoCancelacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
using (ClsNominas Nom = new ClsNominas())
|
||||
{
|
||||
@@ -1256,7 +1294,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string SerieFolio = Nom.SerieFolio;
|
||||
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
||||
int CveMotivoCancelacion = -1;
|
||||
if(rowc != null)
|
||||
if (rowc != null)
|
||||
{
|
||||
CveMotivoCancelacion = rowc["CveSATMotivoCancelacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,51 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Titulos2 {
|
||||
background-color: #dfdfdf !important;
|
||||
}
|
||||
|
||||
.Titulos2:hover {
|
||||
background-color: #dfdfdf !important;
|
||||
}
|
||||
|
||||
.Titulos3 {
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.Titulos3:hover {
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
table.GvDatos input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table.GvDatos th:nth-child(1),
|
||||
table.GvDatos th:nth-child(2),
|
||||
table.GvDatos th:nth-child(3),
|
||||
table.GvDatos th:nth-child(4) {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
table.GvDatos.Columns4 th:nth-child(5) {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
table.GvDatos tr:not(.Titulos3):not(.Titulos2) td:nth-last-child(2) {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
table.GvDatos tr:not(.Titulos3):not(.Titulos2) td:nth-last-child(1),
|
||||
table.GvDatos tr:not(.Titulos3):not(.Titulos2) th:nth-last-child(1) {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.actions .btn-group .btn {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -10,19 +55,37 @@
|
||||
Cargas Masivas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li><asp:HyperLink data-toggle="modal" data-target="#DModalCargaexcel" runat="server"><i class="fa fa-ad-excel" style="margin-right:5px"></i> Carga Masiva</asp:HyperLink></li>
|
||||
<li>
|
||||
<asp:HyperLink data-toggle="modal" data-target="#DModalCargaexcel" runat="server"><i class="fa fa-ad-excel" style="margin-right:5px"></i> Carga Masiva</asp:HyperLink></li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption " style="font-size: 120%">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" CssClass="col-md-1">Turno: </asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" CssClass="select2me form-control" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblProyecto" CssClass="col-md-1 compoonenlabel" runat="server" Text="Proyecto:" Style="max-width: 100%"></asp:Label>
|
||||
<div runat="server" id="divddlproyeto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me form-control" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyeccto" CssClass="col-md-1 compoonenlabel" runat="server" Text="SubProyecto:" Style="max-width: 103px;"></asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me form-control" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="list-inline">
|
||||
<%--<li>Cliente:
|
||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
|
||||
@@ -30,23 +93,14 @@
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>--%>
|
||||
<li>Proyecto:
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>SubProyecto:
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li style="width: 297px;"> Turno:
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none; font-size: 120%">
|
||||
<ul class="list-inline">
|
||||
@@ -62,98 +116,130 @@
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="text-align:right">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<br />
|
||||
<br />
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Información</span>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal, CveSubProyecto" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Asistencias"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# String.Format("{0}-{1}", Eval("Codigo"), Eval("Nombre"))%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVProyecto" runat="server" AutoPostBack="True" DataTextField="Proyecto" DataValueField="CveProyecto" OnSelectedIndexChanged="DdlGVProyecto_SelectedIndexChanged" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Sub Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVSubProyecto" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Turno</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>Supervisor</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 140px !important;">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SDD</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="50px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" Display="None" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSalarioDiario" runat="server" HighlightCssClass="vco" TargetControlID="CVSalarioDiario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SDI</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="50px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" Display="None" ErrorMessage="El campo <b>''SDI''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDI" runat="server" HighlightCssClass="vco" TargetControlID="CVSDI" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SD IMSS</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioCotizado" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiarioSS", "{0:N2}") %>' Width="60px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" Display="None" ErrorMessage="El campo <b>''Salario Diario Cotizado''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDT" runat="server" HighlightCssClass="vco" TargetControlID="CVSDT" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCalcularSDI" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:TextBox CssClass="TxtBusqueda form-control input-sm" runat="server" onkeyup="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
||||
<a href="javascript:;" onclick="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:Button ID="BtnGuardarSupervisor" OnClick="BtnGuardarSupervisor_Click" runat="server" Text="Guardar supervisor" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Guardar salario" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal, CveSubProyecto" ToolTip="Listado de Asistencias" ShowHeaderWhenEmpty="true"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvDatos" Style="" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Codigo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# String.Format("<a href=""/RH/Personal.aspx?CvePersonal={1}"" target=""_Blank"">{0}</a>", Eval("Codigo"), Eval("CvePersonal")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# String.Format("<a href=""/RH/Personal.aspx?CvePersonal={1}"" target=""_Blank"">{0}</a>", Eval("Nombre"), Eval("CvePersonal"))%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVProyecto" runat="server" AutoPostBack="True" DataTextField="Proyecto" DataValueField="CveProyecto" OnSelectedIndexChanged="DdlGVProyecto_SelectedIndexChanged" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlGVSubProyecto" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 190px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Turno</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal>
|
||||
<%--<asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SDD</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" Display="None" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSalarioDiario" runat="server" HighlightCssClass="vco" TargetControlID="CVSalarioDiario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>SDI</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" Display="None" ErrorMessage="El campo <b>''SDI''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDI" runat="server" HighlightCssClass="vco" TargetControlID="CVSDI" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>SD IMSS</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioCotizado" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiarioSS", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" Display="None" ErrorMessage="El campo <b>''Salario Diario Cotizado''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSDT" runat="server" HighlightCssClass="vco" TargetControlID="CVSDT" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px">
|
||||
<HeaderTemplate>¿CALCULAR SDI?</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCalcularSDI" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Supervisor</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass=" select2me" Style="width: 140px !important;">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cliente</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="140" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 140px"></ADS:Dropdownlost>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="DModalCargaexcel" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargarexcel" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -200,15 +286,17 @@
|
||||
<div class="portlet-body rowpadding ">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">Calcular Salario Diario Integrado</div>
|
||||
<div class="col-sm-6"> <asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" /></div>
|
||||
<div class="col-sm-6">
|
||||
<asp:CheckBox ID="ChkCalcularSDIXLS" Text=" " CssClass="chksino" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargarSalarios" OnClick="LnkCargarSalarios_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargarSalarios" OnClick="LnkCargarSalarios_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -12,7 +12,15 @@ Partial Class RH_ActualizacionMasiva
|
||||
SetPermisos()
|
||||
|
||||
'DdlCliente.Attributes.Add("onclick", "CargaClientes();")
|
||||
CargaProyecto()
|
||||
'CargaProyecto()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto)
|
||||
divddlproyeto.Visible = DdlProyecto.Visible
|
||||
GvDatos.Columns(2).Visible = DdlProyecto.Visible
|
||||
GvDatos.Columns(3).HeaderText = LblSubProyeccto.Text
|
||||
GvDatos.DataSource = New DataTable()
|
||||
GvDatos.DataBind()
|
||||
|
||||
GvDatos.CssClass = String.Format("{0} {1}", GvDatos.CssClass, If(DdlProyecto.Visible, "Columns4", ""))
|
||||
CargaTurnos()
|
||||
CargaSupervisores()
|
||||
End If
|
||||
@@ -70,16 +78,6 @@ Partial Class RH_ActualizacionMasiva
|
||||
' DdlCliente.Attributes.Remove("onclick")
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaProyecto()
|
||||
ViewState("DTProyectos") = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa)
|
||||
|
||||
Dim Row As DataRow = DirectCast(ViewState("DTProyectos"), DataTable).NewRow()
|
||||
Row("CveProyecto") = -1 : Row("Proyecto") = "Sin Proyecto asignado"
|
||||
DirectCast(ViewState("DTProyectos"), DataTable).Rows.InsertAt(Row, 0)
|
||||
|
||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 1)
|
||||
DdlProyecto.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyecto()
|
||||
ViewState("DTSubProyectos") = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
@@ -90,20 +88,18 @@ Partial Class RH_ActualizacionMasiva
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTurnos()
|
||||
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
DdlTurno.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSupervisores()
|
||||
ViewState("DTUsuarios") = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND EsSupervisorRH = 1 ")
|
||||
ViewState("DTUsuarios") = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0} AND EsSupervisorRH = 1 ", UsuarioActual.CveEmpresa))
|
||||
|
||||
Dim Row As DataRow = DirectCast(ViewState("DTUsuarios"), DataTable).NewRow()
|
||||
Row("CveUsuario") = -1 : Row("Nombre") = "Sin Supervisor Asignado"
|
||||
DirectCast(ViewState("DTUsuarios"), DataTable).Rows.InsertAt(Row, 0)
|
||||
|
||||
'DdlSupervisor.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND EsSupervisorRH = 1 ")
|
||||
'DdlSupervisor.DataBind()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -113,9 +109,10 @@ Partial Class RH_ActualizacionMasiva
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
Using ObjPersonal As New ClsRH
|
||||
|
||||
consultardata()
|
||||
End Sub
|
||||
Public Sub consultardata()
|
||||
Using ObjPersonal As New ClsRH()
|
||||
If ObjPersonal.GetPersonalMasivo(DdlTurno.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjPersonal.DtResultados
|
||||
Else
|
||||
@@ -123,7 +120,6 @@ Partial Class RH_ActualizacionMasiva
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -154,18 +150,21 @@ Partial Class RH_ActualizacionMasiva
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Turno") = "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
||||
e.Row.FCLiteral("LtlNombre").Text = "<b>Sub Proyecto:</b> " & If(e.Row.DBCampo("SubProyecto") = String.Empty, "Sin Proyecto Asignado", e.Row.DBCampo("SubProyecto"))
|
||||
e.Row.Cells(0).ColumnSpan = 7
|
||||
For i As Integer = 1 To 6
|
||||
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<b>{0}:</b> {1}", LblSubProyeccto.Text, If(e.Row.DBCampo("SubProyecto") = String.Empty, "Sin Proyecto Asignado", e.Row.DBCampo("SubProyecto")))
|
||||
|
||||
e.Row.Cells(0).ColumnSpan = 11
|
||||
For i As Integer = 1 To 10
|
||||
e.Row.Cells(i).Visible = False
|
||||
Next
|
||||
e.Row.CssClass = "Titulos2"
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
ElseIf e.Row.DBCampo("Turno") <> "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
||||
e.Row.FCLiteral("LtlNombre").Text = "<b>Turno:</b> " & e.Row.DBCampo("Turno")
|
||||
e.Row.Cells(0).ColumnSpan = 7
|
||||
For i As Integer = 1 To 6
|
||||
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<b>Turno:</b> {0}", e.Row.DBCampo("Turno"))
|
||||
e.Row.Cells(0).ColumnSpan = 11
|
||||
For i As Integer = 1 To 10
|
||||
e.Row.Cells(i).Visible = False
|
||||
Next
|
||||
e.Row.CssClass = "Titulos3"
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
Else
|
||||
'If e.Row.DBCampo("CveProyecto") <> String.Empty Then e.Row.FCDropDownList("DdlGVProyecto").SelectedValue = e.Row.DBCampo("CveProyecto")
|
||||
@@ -177,6 +176,14 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
e.Row.FCTextBox("TxtSalarioCotizado").Text = e.Row.FCTextBox("TxtSalarioCotizado").Text.Replace(",", "")
|
||||
|
||||
e.Row.FCDropDownList("DdlSupervisor").DataSource = DTUsuarios
|
||||
e.Row.FCDropDownList("DdlSupervisor").DataBind()
|
||||
e.Row.FCDropDownList("DdlSupervisor").Items.Insert(0, New ListItem("Sin Supervisor Asignado", "-1"))
|
||||
e.Row.FCDropDownList("DdlSupervisor").SelectedValueExist(e.Row.DBCampo("CveSupervisor").ToString())
|
||||
|
||||
e.Row.FCDropDownLost("DdlClientes").SelectedValue = e.Row.DBCampo("CveCliente")
|
||||
e.Row.FCDropDownLost("DdlClientes").SelectedText = e.Row.DBCampo("Cliente")
|
||||
|
||||
''Deshabilita todo
|
||||
'e.Row.Cells(1).Enabled = True : e.Row.Cells(2).Enabled = True : e.Row.Cells(3).Enabled = True : e.Row.Cells(4).Enabled = True
|
||||
'e.Row.Cells(5).Enabled = True : e.Row.Cells(6).Enabled = True : e.Row.Cells(7).Enabled = True
|
||||
@@ -188,7 +195,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs)
|
||||
'Dim ObjPersonal As New ClsRH
|
||||
'ObjPersonal.IniciaTransacSQL()
|
||||
|
||||
@@ -309,7 +316,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
Response.BinaryWrite(memoryStream.ToArray())
|
||||
Response.[End]()
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrio un error al generar el Formato de salario" & ex.ToString())
|
||||
Alert(String.Format("Ocurrio un error al generar el Formato de salario {0}", ex.ToString()))
|
||||
End Try
|
||||
End Sub
|
||||
Protected Sub LnkCargarSalarios_Click(sender As Object, e As EventArgs)
|
||||
@@ -344,8 +351,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, True).FiltraParametros(" LEN(Codigo)>0 ")
|
||||
Catch ex As Exception
|
||||
continuar = False
|
||||
stringError = "Ocurrio un Error al procesar el excel "
|
||||
String.Format("{0} " & vbCrLf & "{0}", stringError, ex.ToString()).GuardaLog()
|
||||
String.Format("Ocurrio un Error al procesar el excel {0}{1}", vbCrLf, ex.ToString()).GuardaLog()
|
||||
End Try
|
||||
End If
|
||||
If continuar Then
|
||||
@@ -386,4 +392,30 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardarSupervisor_Click(sender As Object, e As EventArgs)
|
||||
Dim CvePersonal As Integer = 0
|
||||
Dim listpersonal As New List(Of RequestUpSupervisorMasiva)
|
||||
For Each Row As GridViewRow In GvDatos.Rows
|
||||
CvePersonal = Row.DataKey("CvePersonal").ToEntero()
|
||||
If CvePersonal > 0 Then
|
||||
listpersonal.Add(New RequestUpSupervisorMasiva() With {.CvePersonal = CvePersonal, .CveUsuario = Row.FCDropDownList("DdlSupervisor").SelectedValue.ToEntero(),
|
||||
.CveCliente = Row.FCDropDownLost("DdlClientes").SelectedValue.ToEntero()})
|
||||
End If
|
||||
Next
|
||||
Dim continuar As Boolean = False
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
If ObjPersonal.UpPersonalSupervisorMasiva(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, listpersonal) Then
|
||||
ObjPersonal.Commit()
|
||||
continuar = True
|
||||
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjPersonal.RollBack()
|
||||
End If
|
||||
End Using
|
||||
If continuar Then
|
||||
consultardata()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -71,15 +71,21 @@ function log(mensaje) {
|
||||
}
|
||||
function FiltrarTabla(idtxt, idtable, idcontador) {
|
||||
if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', 'table-row'); }
|
||||
else { $('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row'); }
|
||||
else {
|
||||
$('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); $('table#' + idtable + ' tr:contains("' + $('#' + idtxt).val() + '")').css('display', 'table-row');
|
||||
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
||||
}
|
||||
}
|
||||
|
||||
function FiltrarTablaV2(idtxt, idtable, idcontador) {
|
||||
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', 'table-row'); }
|
||||
else { $(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', 'table-row'); }
|
||||
if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', ''); }
|
||||
else {
|
||||
$(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', '');
|
||||
$('div.ADScroller .ADScroller-header '+idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($(idtable + ' tr:visible').length);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
|
||||
<asp:Label runat="server" Text="Clasificación" AssociatedControlID="DdlClasificacion"></asp:Label>
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -224,13 +224,14 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL());
|
||||
ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL());
|
||||
ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL());
|
||||
//ClsContPAQi ObjContPaq = null;
|
||||
ClsContPAQi ObjContPaq = null;
|
||||
//StringBuilder MensajeAlert = new StringBuilder() ;
|
||||
Modelos.Factura.MMensajeFactura Resp = new Modelos.Factura.MMensajeFactura();
|
||||
DataTable DtDetalle = objfact.DtDetalle;
|
||||
try
|
||||
{
|
||||
// objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq, ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, ref Resp, ObjAcum: ObjAcum);
|
||||
objfact.GuardarVenta(ref objfact, ref ObjVentas, ref ObjConta, ref ObjInventario, ref ObjContr, ref DtDetalle, objfact.CveNCaVincular, ref ObjContPaq,
|
||||
ref ObjBancos, ref ObjOS, ref ObjEventos, ref ObjCGame, ref ObjClientes, false, ObjAcum,ref Resp);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -803,6 +804,28 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
}
|
||||
//String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
}
|
||||
|
||||
protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int CveClasificacion = DdlClasificacion.SelectedValue.ToEntero();
|
||||
if (UsuarioActual.Empresa.Funcionalidad(141).ToString() == "1")
|
||||
{
|
||||
|
||||
DdlPS.setEsWebService(true);
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString());
|
||||
DdlPS.ddlWS.Attributes.Add("data-pagina", "ventas/ventas");
|
||||
DdlPS.ddlWS.Attributes.Add("data-Estatus", "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
DdlPS.setEsWebService(false);
|
||||
DdlPS.ddl.DataSource = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion: CveClasificacion, Estatus: 1, AplicaParaVenta: 1);
|
||||
DdlPS.ddl.DataBind();
|
||||
}
|
||||
UpModalDefaults.Update();
|
||||
}
|
||||
}
|
||||
namespace ADSistemaLibrary2.SatXml
|
||||
{
|
||||
|
||||
@@ -2478,6 +2478,25 @@ Partial Class Ventas
|
||||
HlFacturasRelaciondas.Visible = True
|
||||
End If
|
||||
|
||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||
DdlSubProyectoDatos.SelectedValueExist(11954)
|
||||
Using ObjVentas As New ClsNominas
|
||||
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", -Request("CveOrdenProduccion").ToEntero()) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
|
||||
'IEPS A NIVEL DETALLE
|
||||
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
DdlMoneda.SelectedValueExist(2)
|
||||
Using ObjVentas As New ClsNominas
|
||||
|
||||
@@ -412,6 +412,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user