Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveChecador,Checador,CveModelo,CveSubProyecto,SubProyecto,CveUsuario,Estatus,FechaIng,IPLocal,Puerto" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveChecador,Checador,CveModelo,CveSubProyecto,SubProyecto,CveUsuario,Estatus,FechaIng,IPLocal,Puerto"
|
||||
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Checador" DataField="Checador" />
|
||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
|
||||
@@ -53,28 +54,34 @@
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Checadores</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtChecador" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtChecador" runat="server" ControlToValidate="TxtChecador" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Checador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtChecador">Checador:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlSubProyecto">Subproyecto:</label>
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="DdlSubProyecto"><asp:label runat="server" ID="LblSubProyecto" for="DdlSubProyecto">Subproyecto:</asp:label>:</label>
|
||||
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="DdlModelo">Modelo:</label>
|
||||
<asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="zkteco" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModelo" runat="server" ControlToValidate="DdlModelo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModelo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="DdlModelo">Modelo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -97,31 +104,7 @@
|
||||
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Text=" " />
|
||||
</div>
|
||||
|
||||
</br>
|
||||
</br>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvChecadorSubProyectos" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvChecadorSubProyectos_RowDataBound" Width="90%"
|
||||
DataKeyNames="CveSubProyecto,CveChecador"
|
||||
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" />
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</br>
|
||||
|
||||
@@ -26,8 +26,9 @@ public partial class RH_CatChecadores : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
CargaSubProyectos();
|
||||
CargaDatos();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,14 +39,19 @@ public partial class RH_CatChecadores : ClsPaginas
|
||||
{
|
||||
GvDatos.DataSource = ObjRH.DtResultados;
|
||||
}
|
||||
|
||||
ObjRH.Dispose();
|
||||
GvDatos.DataBind();
|
||||
GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text;
|
||||
}
|
||||
|
||||
private void CargaSubProyectos()
|
||||
{
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlSubProyecto.DataBind();
|
||||
|
||||
CargarCentrosDeCosto(null, DdlSubProyecto,null, LblSubProyecto);
|
||||
|
||||
}
|
||||
|
||||
protected void BtnAgregarChecador_Click(object sender, EventArgs e)
|
||||
@@ -56,11 +62,7 @@ public partial class RH_CatChecadores : ClsPaginas
|
||||
TxtIPLocal.Text = "";
|
||||
TxtPuerto.Text = "";
|
||||
BtnChecadorAgregar.Text = "Agregar";
|
||||
divChkEstatus.Visible = false;
|
||||
|
||||
GvChecadorSubProyectos.DataSource = null;
|
||||
GvChecadorSubProyectos.DataBind();
|
||||
GvChecadorSubProyectos.Visible = false;
|
||||
divChkEstatus.Visible = false;
|
||||
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||
@@ -78,39 +80,12 @@ public partial class RH_CatChecadores : ClsPaginas
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// bool errorProceso = false;
|
||||
//ObjRH.IniciaTransacSQL();
|
||||
{
|
||||
|
||||
if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked, CveModelo: DdlModelo.SelectedValue.ToEntero()))
|
||||
{
|
||||
Alert("Checador actualizado correctamente");
|
||||
}
|
||||
|
||||
foreach(GridViewRow GvRow in GvChecadorSubProyectos.Rows)
|
||||
{
|
||||
if(GvRow.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
CheckBox Chk = GvRow.FCCheckBox("Chk");
|
||||
if (!ObjRH.AddRemoveChecadoresSubProyectos(CveChecador, GvRow.DataKey("CveSubProyecto").ToEntero(), UsuarioActual.CveUsuario, Chk.Checked))
|
||||
{
|
||||
//errorProceso = true;
|
||||
Alert("Ocurrió un error.",ModExtensiones.TipoMensaje.MsgError);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if (errorProceso)
|
||||
//{
|
||||
// ObjRH.RollBack();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ObjRH.Commit();
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
ObjRH.Dispose();
|
||||
CargaDatos();
|
||||
@@ -133,21 +108,6 @@ public partial class RH_CatChecadores : ClsPaginas
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") == "Activo";
|
||||
divChkEstatus.Visible = true;
|
||||
|
||||
GvChecadorSubProyectos.Visible = true;
|
||||
|
||||
ClsRH objRH = new ClsRH();
|
||||
|
||||
if (objRH.GetChecadoresSubProyectos(CveChecador, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvChecadorSubProyectos.DataSource = objRH.DtResultados;
|
||||
}
|
||||
|
||||
GvChecadorSubProyectos.DataBind();
|
||||
objRH.Dispose();
|
||||
|
||||
|
||||
|
||||
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
<asp:RegularExpressionValidator ID="REVCorreo" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="help-block errorimput" ControlToValidate="TxtCorreo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo - Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" style="display:none;">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtMailrecibonomina" runat="server" CausesValidation="true" MaxLength="70"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtMailrecibonomina" Text="Mail recibo nómina:"></asp:Label>
|
||||
</div>
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Tipo Periodo:
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 150px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 120px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li><asp:label ID="LblPeriodo" runat="server" Visible="true" >Periodo:</asp:label>
|
||||
<asp:DropDownList ID="DdlRango" Visible="true" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 300px !important;" DataTextField="NominaEstatus" DataValueField="CvePeriodo" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList ID="DdlRango" Visible="true" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 275px !important;" DataTextField="NominaEstatus" DataValueField="CvePeriodo" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<%--<li>Fecha Inicio:
|
||||
@@ -73,25 +73,24 @@
|
||||
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>--%>
|
||||
<li>SubProyecto:
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" Style="width: 150px; !important;" DataTextField="SubProyecto" DataValueField="CveSubproyecto">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" Style="width: 135px; !important;" DataTextField="SubProyecto" DataValueField="CveSubproyecto">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Turno:
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" Class="form-control input-sm select2me" DataTextField="Turno" DataValueField="CveTurno" Width="150">
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" Class="form-control input-sm select2me" DataTextField="Turno" DataValueField="CveTurno" Width="100">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Checador
|
||||
<asp:RadioButton ID="RdbChecador" runat="server" Checked="true" GroupName="Checador" />
|
||||
<asp:RadioButton ID="RdbChecador" runat="server" Checked="true" GroupName="Checador" TextAlign="Right" />
|
||||
</li>
|
||||
<li>Lista Asistencia
|
||||
<asp:RadioButton ID="RdbAsistencia" runat="server" GroupName="Checador" />
|
||||
<asp:RadioButton ID="RdbAsistencia" runat="server" GroupName="Checador" TextAlign="Right" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="false" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -103,12 +102,12 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" DataKeyNames="CvePersonal,NombreCompleto"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Numero" ItemStyle-HorizontalAlign="Left" >
|
||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("CvePersonal") %>'> </asp:Label>
|
||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
||||
@@ -310,7 +309,7 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias"></asp:DropDownList></td>
|
||||
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" ></asp:DropDownList></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -331,6 +330,8 @@
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -338,8 +339,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
|
||||
<asp:Button ID="BtnEstusAsistenciaModal" runat="server" class="btn btn-success" Text="Aceptar" ValidationGroup="GrpAsistencia" />
|
||||
<asp:Button ID="BtnGuardar" Visible="true" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardar_Click" />
|
||||
<asp:Button ID="BtnEstusAsistenciaModal" Visible="false" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
@@ -384,10 +385,7 @@
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="RfvcRfvTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CVCCVTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -126,6 +126,33 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CvePersonalSeleccionado As Integer
|
||||
Get
|
||||
If ViewState("CvePersonalSeleccionado") Is Nothing Then
|
||||
ViewState("CvePersonalSeleccionado") = -1
|
||||
End If
|
||||
Return ViewState("CvePersonalSeleccionado").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePersonalSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FechaSeleccionada As Date
|
||||
Get
|
||||
If ViewState("FechaSeleccionada") Is Nothing Then
|
||||
ViewState("FechaSeleccionada") = MinFecha
|
||||
End If
|
||||
Return ViewState("FechaSeleccionada").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaSeleccionada") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -154,7 +181,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
objNom.Dispose()
|
||||
|
||||
DdlTipoPeriodo.DataBind()
|
||||
DdlTipoPeriodo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlTipoPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
||||
DdlTurno.DataBind()
|
||||
@@ -327,7 +354,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Resultados.Columns.Add("CvePersonal")
|
||||
Resultados.Columns.Add("NombreCompleto")
|
||||
'Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("CveSubProyecto")
|
||||
Resultados.Columns.Add("SalarioDiario")
|
||||
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
||||
@@ -349,7 +376,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Resultados.Columns.Add("TipoCorto")
|
||||
Resultados.Columns.Add("Sancion")
|
||||
|
||||
If DdlTurno.SelectedValue.ToEntero > 0 And DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim FiltroSubProyecto As String = ""
|
||||
Dim filtroturno = If(DdlTurno.SelectedValue = "-1", "", $"AND CveTurno = { DdlTurno.SelectedValue}")
|
||||
@@ -359,7 +386,19 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } {filtroturno} "
|
||||
End If
|
||||
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
||||
'DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
||||
|
||||
Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
|
||||
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto).AsEnumerable()
|
||||
Let Inicio = fila.Field(Of Date)("FechaInicio")
|
||||
Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
||||
Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
||||
Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
||||
Select fila
|
||||
|
||||
DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||
|
||||
If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTHorarios = objRH.DtResultados
|
||||
@@ -396,20 +435,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
'If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
|
||||
If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
BtnAgregar.Visible = False
|
||||
BtnEstusAsistenciaModal.Visible = False
|
||||
DdlAsistenciaInacistencia.Enabled = False
|
||||
Else
|
||||
BtnAgregar.Visible = True
|
||||
BtnEstusAsistenciaModal.Visible = True
|
||||
DdlAsistenciaInacistencia.Enabled = True
|
||||
End If
|
||||
UpAgregar.Update()
|
||||
End If
|
||||
' If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
' BtnAgregar.Visible = False
|
||||
' BtnEstusAsistenciaModal.Visible = False
|
||||
' 'DdlAsistenciaInacistencia.Enabled = False
|
||||
' Else
|
||||
' BtnAgregar.Visible = True
|
||||
' BtnEstusAsistenciaModal.Visible = True
|
||||
' 'DdlAsistenciaInacistencia.Enabled = True
|
||||
' End If
|
||||
' UpAgregar.Update()
|
||||
'End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
@@ -422,6 +461,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
Dim CveTurno As Integer = dRow("CveTurno").ToString.ToEntero
|
||||
Dim DiaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {CveTurno} ").ToEntero - 1 'El -1 es por que en .net el domingo empieza 0 y en la sql en 1
|
||||
Dim Codigo As String = dRow("Codigo").ToString
|
||||
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
||||
Retardos = 0
|
||||
@@ -431,7 +474,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
@@ -458,7 +501,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
Dim Asistencia As Boolean = True
|
||||
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal, DiaDescanso)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||
|
||||
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
||||
@@ -615,7 +658,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
@@ -651,7 +694,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
End If
|
||||
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal, DiaDescanso)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||
|
||||
If Not DiaLaboral Then
|
||||
@@ -705,6 +748,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
|
||||
Dim Codigo As String = dRow("Codigo").ToString
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
|
||||
For x As Integer = 1 To (DiasPeriodo)
|
||||
@@ -712,7 +757,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
@@ -765,7 +810,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
ReRow("Asistio") = "False"
|
||||
@@ -802,8 +847,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DtResultados = Resultados
|
||||
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
@@ -836,6 +881,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
|
||||
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
|
||||
@@ -845,7 +891,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
For x As Integer = 3 To dt.Columns.Count
|
||||
For x As Integer = 3 To dt.Columns.Count-1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
@@ -866,9 +912,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
ColumN = 2
|
||||
ColumN = 3
|
||||
|
||||
Dim ResumenDia As New DataTable
|
||||
Dim DTTempAsistencias As New DataTable
|
||||
@@ -970,170 +1016,231 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
Private Sub ReprocesarTabla()
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
Dim DTAsistenciasInasistencias As New DataTable
|
||||
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
Dim DTAsistenciasInasistencias As New DataTable
|
||||
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
dt.Columns.Add("Fecha4")
|
||||
dt.Columns.Add("Fecha5")
|
||||
dt.Columns.Add("Fecha6")
|
||||
dt.Columns.Add("Fecha7")
|
||||
dt.Columns.Add("Fecha8")
|
||||
dt.Columns.Add("Fecha9")
|
||||
dt.Columns.Add("Fecha10")
|
||||
dt.Columns.Add("Fecha11")
|
||||
dt.Columns.Add("Fecha12")
|
||||
dt.Columns.Add("Fecha13")
|
||||
dt.Columns.Add("Fecha14")
|
||||
dt.Columns.Add("Fecha15")
|
||||
dt.Columns.Add("Fecha16")
|
||||
dt.Columns.Add("Fecha17")
|
||||
dt.Columns.Add("Fecha18")
|
||||
dt.Columns.Add("Fecha19")
|
||||
dt.Columns.Add("Fecha20")
|
||||
dt.Columns.Add("Fecha21")
|
||||
dt.Columns.Add("Fecha22")
|
||||
dt.Columns.Add("Fecha23")
|
||||
dt.Columns.Add("Fecha24")
|
||||
dt.Columns.Add("Fecha25")
|
||||
dt.Columns.Add("Fecha26")
|
||||
dt.Columns.Add("Fecha27")
|
||||
dt.Columns.Add("Fecha28")
|
||||
dt.Columns.Add("Fecha29")
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
Dim DTVFechas As New DataView(DtResultados)
|
||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
|
||||
For x As Integer = 3 To ColumN - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")).AsEnumerable()
|
||||
Let Inicio = fila.Field(Of Date)("FechaInicio")
|
||||
Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
||||
Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
||||
Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
||||
Select fila
|
||||
|
||||
ColumN = 3
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
'DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
dt.Columns.Add("Fecha4")
|
||||
dt.Columns.Add("Fecha5")
|
||||
dt.Columns.Add("Fecha6")
|
||||
dt.Columns.Add("Fecha7")
|
||||
dt.Columns.Add("Fecha8")
|
||||
dt.Columns.Add("Fecha9")
|
||||
dt.Columns.Add("Fecha10")
|
||||
dt.Columns.Add("Fecha11")
|
||||
dt.Columns.Add("Fecha12")
|
||||
dt.Columns.Add("Fecha13")
|
||||
dt.Columns.Add("Fecha14")
|
||||
dt.Columns.Add("Fecha15")
|
||||
dt.Columns.Add("Fecha16")
|
||||
dt.Columns.Add("Fecha17")
|
||||
dt.Columns.Add("Fecha18")
|
||||
dt.Columns.Add("Fecha19")
|
||||
dt.Columns.Add("Fecha20")
|
||||
dt.Columns.Add("Fecha21")
|
||||
dt.Columns.Add("Fecha22")
|
||||
dt.Columns.Add("Fecha23")
|
||||
dt.Columns.Add("Fecha24")
|
||||
dt.Columns.Add("Fecha25")
|
||||
dt.Columns.Add("Fecha26")
|
||||
dt.Columns.Add("Fecha27")
|
||||
dt.Columns.Add("Fecha28")
|
||||
dt.Columns.Add("Fecha29")
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
|
||||
ColumN = 2
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
Dim DTVFechas As New DataView(DtResultados)
|
||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
For x As Integer = 3 To ColumN - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
|
||||
ColumN = 3
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
ColumN = 2
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
If TipoCorto <> "" Then
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
|
||||
If TipoCorto = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
If TipoCorto <> "" Then
|
||||
|
||||
If TipoCorto = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
Else
|
||||
|
||||
If TipoCorto = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
End If
|
||||
|
||||
If TipoCorto = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
Else
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
|
||||
End If
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
RRow(ColumN) = "C" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1141,62 +1248,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
|
||||
End If
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
RRow(ColumN) = "C" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
ColumN = ColumN + 1
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable) As DataTable
|
||||
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable, DiaDescanso As Integer) As DataTable
|
||||
Dim respuesta As New DataTable
|
||||
respuesta.Columns.Add("TRABAJO", System.Type.GetType("System.Boolean"))
|
||||
|
||||
@@ -1212,9 +1278,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
|
||||
DiaDescanso = If(DiaDescanso > -1, DiaDescanso, 0)
|
||||
|
||||
Select Case diaSemana
|
||||
Case 0
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Domingo").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
||||
@@ -1222,42 +1291,48 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Exit Select
|
||||
Case 1
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Lunes").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("LunesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 2
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Martes").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MartesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 3
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Miercoles").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MiercolesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 4
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Jueves").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("JuevesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 5
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Viernes").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("ViernesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 6
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Sabado").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntradaComida").ToString()))
|
||||
@@ -1451,7 +1526,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = ""
|
||||
|
||||
lnkLink.CommandArgument = lnkLink.Text
|
||||
lnkLink.CommandArgument = $"{lnkLink.Text}|{e.Row.DataKey("CvePersonal")}|{e.Row.DataKey("NombreCompleto")}"
|
||||
|
||||
If Instruccion = "-" Then
|
||||
lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>"
|
||||
@@ -1572,6 +1647,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CvePersonalSeleccionado = -1
|
||||
|
||||
Dim lnkLinkSender As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim DTDatos As New DataTable
|
||||
Dim DTTipoAsistenciaInasistencia As DataTable
|
||||
@@ -1592,6 +1669,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
objRH.Dispose()
|
||||
|
||||
Instruccion = arrayComands(0)
|
||||
CvePersonalSeleccionado = arrayComands(2).ToEntero
|
||||
|
||||
LtlAsistenciaHorariosModal.Text = arrayComands(3)
|
||||
|
||||
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
|
||||
|
||||
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||
@@ -1614,6 +1695,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
DTDatos = DtResultados.FiltraParametros(Filtro)
|
||||
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||
FechaSeleccionada = DTDatos(0)("Fecha").ToString().ToDate
|
||||
|
||||
lnkModalImg.Text = ""
|
||||
|
||||
@@ -1901,4 +1983,18 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada,
|
||||
DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
Alert("Registro Actualziado Correctamente.")
|
||||
|
||||
End If
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user