This commit is contained in:
@@ -1405,6 +1405,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -4979,62 +4980,6 @@
|
|||||||
</Body>
|
</Body>
|
||||||
<Width>8.00648in</Width>
|
<Width>8.00648in</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageFooter>
|
|
||||||
<Height>0.68792cm</Height>
|
|
||||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
|
||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
|
||||||
<ReportItems>
|
|
||||||
<Textbox Name="Textbox83">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Fecha Impresión: </Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Today</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
<TextRun>
|
|
||||||
<Value xml:space="preserve"> </Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
|
||||||
<Top>0.08364cm</Top>
|
|
||||||
<Left>0.10282cm</Left>
|
|
||||||
<Height>0.46771cm</Height>
|
|
||||||
<Width>6.92282cm</Width>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>2pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</ReportItems>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
</Style>
|
|
||||||
</PageFooter>
|
|
||||||
<PageHeight>27.94cm</PageHeight>
|
<PageHeight>27.94cm</PageHeight>
|
||||||
<PageWidth>21.59cm</PageWidth>
|
<PageWidth>21.59cm</PageWidth>
|
||||||
<LeftMargin>0.5cm</LeftMargin>
|
<LeftMargin>0.5cm</LeftMargin>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>COMPUPROVEEDORES SA DE CV</Value>
|
<Value />
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>San luis Potosi No. 21 Col Centro C.P. 83000</Value>
|
<Value />
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>R.F.C</Value>
|
<Value />
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>COM-890602-EE8</Value>
|
<Value />
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -445,7 +445,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Hermosillo,Sonora,Mexico</Value>
|
<Value />
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
|
|||||||
@@ -1755,10 +1755,54 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
lconc.Add(SubTotales);
|
lconc.Add(SubTotales);
|
||||||
lconc.Add(Totales);
|
lconc.Add(Totales);
|
||||||
|
|
||||||
|
DataTable dtCon = new DataTable();
|
||||||
|
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
|
||||||
|
foreach(NConcepto itc in lconc)
|
||||||
|
{
|
||||||
|
DataRow dr = dtCon.NewRow();
|
||||||
|
dr["NoConceptoP"] = itc.NoConceptoP;
|
||||||
|
dr["ConceptoP"] = itc.ConceptoP;
|
||||||
|
dr["LabelValorP"] = itc.LabelValorP;
|
||||||
|
dr["CveConceptoP"] = itc.CveConceptoP;
|
||||||
|
dr["ImporteP"] = itc.ImporteP;
|
||||||
|
dr["ValorP"] = itc.ValorP;
|
||||||
|
dr["EstatusP"] = itc.EstatusP;
|
||||||
|
dr["isEditedP"] = itc.isEditedP;
|
||||||
|
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
|
||||||
|
dr["NoConceptoD"] = itc.NoConceptoD;
|
||||||
|
dr["ConceptoD"] = itc.ConceptoD;
|
||||||
|
dr["LabelValorD"] = itc.LabelValorD;
|
||||||
|
dr["CveConceptoD"] = itc.CveConceptoD;
|
||||||
|
dr["ImporteD"] = itc.ImporteD;
|
||||||
|
dr["ValorD"] = itc.ValorD;
|
||||||
|
dr["EstatusD"] = itc.EstatusD;
|
||||||
|
dr["isEditedD"] = itc.isEditedD;
|
||||||
|
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
|
||||||
|
dtCon.Rows.Add(dr);
|
||||||
|
}
|
||||||
|
dtCon.AcceptChanges();
|
||||||
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
|
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
|
||||||
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
|
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
|
||||||
rds.Name = "DataSet1";
|
rds.Name = "DataSet1";
|
||||||
rds.Value = lconc;
|
rds.Value = dtCon;// lconc;
|
||||||
lrds.Add(rds);
|
lrds.Add(rds);
|
||||||
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
|
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
|
||||||
|
|
||||||
@@ -1821,8 +1865,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||||
;
|
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreRecibo.rdlc",UsuarioActual.CveEmpresa ));
|
||||||
ImprimirPDF(System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc"), lrds, parametros, "SobreRecibo", "PDF", null);
|
if (!System.IO.File.Exists(urlfile))
|
||||||
|
{
|
||||||
|
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
|
||||||
}
|
}
|
||||||
protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
|
protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ Imports System.Data
|
|||||||
|
|
||||||
Partial Class RH_RepChecadorPreAsistencia
|
Partial Class RH_RepChecadorPreAsistencia
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
#Region "Propiedades"
|
||||||
|
|
||||||
Private Property FiltroAplicado As String
|
Private Property FiltroAplicado As String
|
||||||
Get
|
Get
|
||||||
If ViewState("CveRegistroDetalle") Is Nothing Then
|
If ViewState("CveRegistroDetalle") Is Nothing Then
|
||||||
Return "-1"
|
Return "-1"
|
||||||
Else
|
Else
|
||||||
Return ViewState("CveRegistroDetalle").ToString
|
Return ViewState("CveRegistroDetalle").ToString()
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -125,6 +126,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
@@ -172,8 +174,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
lblTituloPagina.Text = DdlRango.SelectedItem.Text
|
lblTituloPagina.Text = DdlRango.SelectedItem.Text
|
||||||
|
|
||||||
Dim DtTemp As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
Dim DtTemp As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||||
FechaInicioPeriodo = DtTemp(0)("FechaInicio").ToString.ToDate
|
FechaInicioPeriodo = DtTemp(0)("FechaInicio").ToString().ToDate
|
||||||
FechaFinPeriodo = DtTemp(0)("FechaFin").ToString.ToDate
|
FechaFinPeriodo = DtTemp(0)("FechaFin").ToString().ToDate
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpTituloPagina.Update()
|
UpTituloPagina.Update()
|
||||||
@@ -190,7 +192,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
If DdlTipoPeriodo.SelectedIndex <> 0 Then
|
If DdlTipoPeriodo.SelectedIndex <> 0 Then
|
||||||
|
|
||||||
CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero
|
CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero
|
||||||
DiasPeriodo = DTTipoPeriodoDatos.FiltraParametros(" CveTipoPeriodo = " & DdlTipoPeriodo.SelectedValue)(0)("DiasPeriodo").ToString.ToEntero
|
DiasPeriodo = DTTipoPeriodoDatos.FiltraParametros(" CveTipoPeriodo = " & DdlTipoPeriodo.SelectedValue)(0)("DiasPeriodo").ToString().ToEntero
|
||||||
|
|
||||||
Dim objNomina As New ClsNominas
|
Dim objNomina As New ClsNominas
|
||||||
|
|
||||||
@@ -228,7 +230,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
DdlRango.DataBind()
|
DdlRango.DataBind()
|
||||||
|
|
||||||
If DtTempFechaInicial.Rows.Count > 0 Then
|
If DtTempFechaInicial.Rows.Count > 0 Then
|
||||||
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString.ToEntero
|
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString().ToEntero
|
||||||
DdlRango.SelectedValueExist(temCvePeriodoNomi)
|
DdlRango.SelectedValueExist(temCvePeriodoNomi)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -292,10 +294,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim CveAsistenciaInasistenciaDescanso As Integer = -1
|
Dim CveAsistenciaInasistenciaDescanso As Integer = -1
|
||||||
|
|
||||||
Try
|
Try
|
||||||
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'A' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'A' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'F' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'F' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'R' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'R' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'D' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'D' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Se presento un error al obtener las claves de asistencia.", TipoMensaje.MsgError)
|
Alert("Se presento un error al obtener las claves de asistencia.", TipoMensaje.MsgError)
|
||||||
@@ -350,9 +352,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim FiltroSubProyecto As String = ""
|
Dim FiltroSubProyecto As String = ""
|
||||||
|
|
||||||
If DdlSubProyecto.SelectedIndex > 0 Then
|
If DdlSubProyecto.SelectedIndex > 0 Then
|
||||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveEstado = 1 AND CveTurno = { DdlTurno.SelectedValue} AND CveSubProyecto = { DdlSubProyecto.SelectedValue.ToEntero }"
|
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveTurno = { DdlTurno.SelectedValue} AND CveSubProyecto = { DdlSubProyecto.SelectedValue.ToEntero }"
|
||||||
Else
|
Else
|
||||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveEstado = 1 AND CveTurno = { DdlTurno.SelectedValue} "
|
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveTurno = { DdlTurno.SelectedValue} "
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
||||||
@@ -365,15 +367,15 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim TMCveChecadorHorario As Integer = -1
|
Dim TMCveChecadorHorario As Integer = -1
|
||||||
|
|
||||||
If DTTemp.Rows.Count > 0 Then
|
If DTTemp.Rows.Count > 0 Then
|
||||||
TMCveChecadorHorario = DTTemp(0)("CveChecadorHorario").ToString.ToEntero
|
TMCveChecadorHorario = DTTemp(0)("CveChecadorHorario").ToString().ToEntero
|
||||||
Dim DtHorarioTemp = DTHorarios.FiltraParametros("CveChecadorHorario = " & TMCveChecadorHorario)
|
Dim DtHorarioTemp = DTHorarios.FiltraParametros("CveChecadorHorario = " & TMCveChecadorHorario)
|
||||||
|
|
||||||
If DtHorarioTemp.Rows.Count > 0 Then
|
If DtHorarioTemp.Rows.Count > 0 Then
|
||||||
TolRetAcumulados = DtHorarioTemp(0)("TolRetAcumulados").ToString.ToEntero
|
TolRetAcumulados = DtHorarioTemp(0)("TolRetAcumulados").ToString().ToEntero
|
||||||
TolRetEntradaMin = DtHorarioTemp(0)("TolRetEntradaMin").ToString.ToEntero
|
TolRetEntradaMin = DtHorarioTemp(0)("TolRetEntradaMin").ToString().ToEntero
|
||||||
TolFalEntradaMin = DtHorarioTemp(0)("TolFalEntradaMin").ToString.ToEntero
|
TolFalEntradaMin = DtHorarioTemp(0)("TolFalEntradaMin").ToString().ToEntero
|
||||||
RetSalidaAntes = Boolean.Parse(DtHorarioTemp(0)("RetSalidaAntes").ToString)
|
RetSalidaAntes = Boolean.Parse(DtHorarioTemp(0)("RetSalidaAntes").ToString())
|
||||||
TolSalidaAntesMin = DtHorarioTemp(0)("TolSalidaAntesMin").ToString.ToEntero
|
TolSalidaAntesMin = DtHorarioTemp(0)("TolSalidaAntesMin").ToString().ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -416,22 +418,22 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Dim Fecha As Date = FechaInicioPeriodo
|
Dim Fecha As Date = FechaInicioPeriodo
|
||||||
Dim ContadorFaltas As Integer = 0
|
Dim ContadorFaltas As Integer = 0
|
||||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString)
|
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||||
|
|
||||||
If registrosPersonal.Rows.Count > 0 Then
|
If registrosPersonal.Rows.Count > 0 Then
|
||||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString & "")
|
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
||||||
Retardos = 0
|
Retardos = 0
|
||||||
|
|
||||||
For x As Integer = 1 To (DiasPeriodo)
|
For x As Integer = 1 To (DiasPeriodo)
|
||||||
|
|
||||||
Dim ReRow As DataRow = Resultados.NewRow
|
Dim ReRow As DataRow = Resultados.NewRow
|
||||||
ReRow("CvePersonal") = dRow(0).ToString
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
ReRow("Fecha") = Fecha.ToString
|
ReRow("Fecha") = Fecha.ToString()
|
||||||
ReRow("Retraso") = "False"
|
ReRow("Retraso") = "False"
|
||||||
ReRow("Asistio") = "True"
|
ReRow("Asistio") = "True"
|
||||||
ReRow("Inconsistencia") = "False"
|
ReRow("Inconsistencia") = "False"
|
||||||
@@ -454,12 +456,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim Asistencia As Boolean = True
|
Dim Asistencia As Boolean = True
|
||||||
|
|
||||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString)
|
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||||
|
|
||||||
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString)
|
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
||||||
Dim HorarioSalidaComida As TimeSpan = TimeSpan.Parse(Horario(0)(2).ToString)
|
Dim HorarioSalidaComida As TimeSpan = TimeSpan.Parse(Horario(0)(2).ToString())
|
||||||
Dim HorarioEntradaComida As TimeSpan = TimeSpan.Parse(Horario(0)(3).ToString)
|
Dim HorarioEntradaComida As TimeSpan = TimeSpan.Parse(Horario(0)(3).ToString())
|
||||||
Dim HorarioSalida As TimeSpan = TimeSpan.Parse(Horario(0)(4).ToString)
|
Dim HorarioSalida As TimeSpan = TimeSpan.Parse(Horario(0)(4).ToString())
|
||||||
|
|
||||||
Dim FechaHoraEntrada As DateTime
|
Dim FechaHoraEntrada As DateTime
|
||||||
Dim FechahoraSalida As DateTime
|
Dim FechahoraSalida As DateTime
|
||||||
@@ -478,10 +480,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim tempDatetime1 As DateTime = FechaHoraEntrada.AddHours(-2) 'la entrada se podra checar hasta dos horas antes de la hora de entrada
|
Dim tempDatetime1 As DateTime = FechaHoraEntrada.AddHours(-2) 'la entrada se podra checar hasta dos horas antes de la hora de entrada
|
||||||
Dim tempDatetime2 As DateTime = FechahoraSalida.AddHours(4) 'Legalmente no se pueden hacer mas de 3 horas extras al día
|
Dim tempDatetime2 As DateTime = FechahoraSalida.AddHours(4) 'Legalmente no se pueden hacer mas de 3 horas extras al día
|
||||||
|
|
||||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString & " AND FechaRegistro >= '" & tempDatetime1.ToShortDateString & "' AND FechaRegistro <= '" & tempDatetime2.ToString & "'")
|
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND FechaRegistro >= '" & tempDatetime1.ToShortDateString & "' AND FechaRegistro <= '" & tempDatetime2.ToString() & "'")
|
||||||
|
|
||||||
If DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString & " AND Fecha >= '" & Fecha & "'").Rows.Count > 0 Then
|
If DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha >= '" & Fecha & "'").Rows.Count > 0 Then
|
||||||
ReRow("CveAsistenciasInasistencias") = DTAsistenciasInasistencias(0)("CveAsistenciasInasistencias").ToString
|
ReRow("CveAsistenciasInasistencias") = DTAsistenciasInasistencias(0)("CveAsistenciasInasistencias").ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CountRegistros As Integer = tabladelDia.Rows.Count
|
Dim CountRegistros As Integer = tabladelDia.Rows.Count
|
||||||
@@ -494,11 +496,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("Descanso") = "True"
|
ReRow("Descanso") = "True"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString & "'")
|
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString() & "'")
|
||||||
If TempDTValidaciones.Rows.Count > 0 Then
|
If TempDTValidaciones.Rows.Count > 0 Then
|
||||||
ReRow("PorcentajePago") = "100"
|
ReRow("PorcentajePago") = "100"
|
||||||
ReRow("DiaInhabil") = "True"
|
ReRow("DiaInhabil") = "True"
|
||||||
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString
|
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString()
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaDescanso
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaDescanso
|
||||||
ReRow("PorcentajePago") = "100"
|
ReRow("PorcentajePago") = "100"
|
||||||
Else
|
Else
|
||||||
@@ -506,7 +508,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("DiaInhabilStr") = ""
|
ReRow("DiaInhabilStr") = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString & "' AND CvePersonal = " & dRow(0).ToString)
|
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString() & "' AND CvePersonal = " & dRow(0).ToString())
|
||||||
|
|
||||||
If TempDTValidaciones.Rows.Count > 0 Then
|
If TempDTValidaciones.Rows.Count > 0 Then
|
||||||
ReRow("DiaVacacion") = "True"
|
ReRow("DiaVacacion") = "True"
|
||||||
@@ -524,23 +526,23 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("PorcentajePago") = "100"
|
ReRow("PorcentajePago") = "100"
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ReRow("DiaVacacion").ToString <> "True" And ReRow("Descanso").ToString <> "True" Then
|
If ReRow("DiaVacacion").ToString() <> "True" And ReRow("Descanso").ToString() <> "True" Then
|
||||||
|
|
||||||
If CountRegistros > 0 Then
|
If CountRegistros > 0 Then
|
||||||
|
|
||||||
FechaHoraRegistroEntrada = DateTime.Parse(tabladelDia(0)("FechaRegistro").ToString)
|
FechaHoraRegistroEntrada = DateTime.Parse(tabladelDia(0)("FechaRegistro").ToString())
|
||||||
FechaHoraRegistroSalida = DateTime.Parse(tabladelDia(tabladelDia.Rows.Count - 1)("FechaRegistro").ToString)
|
FechaHoraRegistroSalida = DateTime.Parse(tabladelDia(tabladelDia.Rows.Count - 1)("FechaRegistro").ToString())
|
||||||
|
|
||||||
If Not (FechaHoraRegistroEntrada - FechaHoraEntrada).TotalMinutes > TolFalEntradaMin Then
|
If Not (FechaHoraRegistroEntrada - FechaHoraEntrada).TotalMinutes > TolFalEntradaMin Then
|
||||||
If (FechaHoraRegistroEntrada - FechaHoraEntrada).TotalMinutes > TolRetEntradaMin Then
|
If (FechaHoraRegistroEntrada - FechaHoraEntrada).TotalMinutes > TolRetEntradaMin Then
|
||||||
|
|
||||||
Retardos = Retardos + 1
|
Retardos = Retardos + 1
|
||||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Retardo"
|
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Retardo"
|
||||||
|
|
||||||
If Retardos >= TolRetAcumulados Then
|
If Retardos >= TolRetAcumulados Then
|
||||||
ReRow("Asistio") = "False"
|
ReRow("Asistio") = "False"
|
||||||
ReRow("FaltaRetardosAcumulados") = "True"
|
ReRow("FaltaRetardosAcumulados") = "True"
|
||||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & " Falta por " & TolRetAcumulados & " acumulados. "
|
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & " Falta por " & TolRetAcumulados & " acumulados. "
|
||||||
Retardos = 0
|
Retardos = 0
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
@@ -557,7 +559,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Asistencia = False
|
Asistencia = False
|
||||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Falta por retardo."
|
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Falta por retardo."
|
||||||
ReRow("FaltaRetraso") = "True"
|
ReRow("FaltaRetraso") = "True"
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
@@ -565,20 +567,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
If FechahoraSalida > FechaHoraRegistroSalida Then
|
If FechahoraSalida > FechaHoraRegistroSalida Then
|
||||||
|
|
||||||
Dim diferenciasalidaMinutos As Integer = (FechahoraSalida - FechaHoraRegistroSalida).TotalMinutes.ToString.ToEntero
|
Dim diferenciasalidaMinutos As Integer = (FechahoraSalida - FechaHoraRegistroSalida).TotalMinutes.ToString().ToEntero
|
||||||
|
|
||||||
If RetSalidaAntes Then
|
If RetSalidaAntes Then
|
||||||
If diferenciasalidaMinutos > TolSalidaAntesMin Then
|
If diferenciasalidaMinutos > TolSalidaAntesMin Then
|
||||||
|
|
||||||
ReRow("Asistio") = "True"
|
ReRow("Asistio") = "True"
|
||||||
ReRow("Retraso") = "True"
|
ReRow("Retraso") = "True"
|
||||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Retraso por salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Retraso por salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaRetardo
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaRetardo
|
||||||
ReRow("PorcentajePago") = "100"
|
ReRow("PorcentajePago") = "100"
|
||||||
Else
|
Else
|
||||||
ReRow("Asistio") = "True"
|
ReRow("Asistio") = "True"
|
||||||
ReRow("Retraso") = "False"
|
ReRow("Retraso") = "False"
|
||||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
||||||
ReRow("CveAsistenciasInasistencias") = CveASistenciaInasistenciaAsistio
|
ReRow("CveAsistenciasInasistencias") = CveASistenciaInasistenciaAsistio
|
||||||
ReRow("PorcentajePago") = "100"
|
ReRow("PorcentajePago") = "100"
|
||||||
|
|
||||||
@@ -595,7 +597,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ReRow("Asistio").ToString = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||||
|
|
||||||
|
|
||||||
Resultados.Rows.Add(ReRow)
|
Resultados.Rows.Add(ReRow)
|
||||||
@@ -608,15 +610,15 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Dim ReRow As DataRow = Resultados.NewRow
|
Dim ReRow As DataRow = Resultados.NewRow
|
||||||
|
|
||||||
ReRow("CvePersonal") = dRow(0).ToString
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
|
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
|
|
||||||
ReRow("Fecha") = Fecha.ToString
|
ReRow("Fecha") = Fecha.ToString()
|
||||||
ReRow("Retraso") = "False"
|
ReRow("Retraso") = "False"
|
||||||
ReRow("Inconsistencia") = "False"
|
ReRow("Inconsistencia") = "False"
|
||||||
ReRow("Descanso") = "False"
|
ReRow("Descanso") = "False"
|
||||||
@@ -633,9 +635,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("TipoCorto") = ""
|
ReRow("TipoCorto") = ""
|
||||||
ReRow("Sancion") = "False"
|
ReRow("Sancion") = "False"
|
||||||
|
|
||||||
If dRow("CveChecadorHorario").ToString.ToEntero > 0 Then
|
If dRow("CveChecadorHorario").ToString().ToEntero > 0 Then
|
||||||
|
|
||||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & dRow("CveChecadorHorario").ToString.ToEntero & "")
|
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & dRow("CveChecadorHorario").ToString().ToEntero & "")
|
||||||
|
|
||||||
If Fecha >= Now Then
|
If Fecha >= Now Then
|
||||||
ReRow("Asistio") = "True"
|
ReRow("Asistio") = "True"
|
||||||
@@ -646,7 +648,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString)
|
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||||
|
|
||||||
If Not DiaLaboral Then
|
If Not DiaLaboral Then
|
||||||
|
|
||||||
@@ -655,11 +657,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("Descanso") = "True"
|
ReRow("Descanso") = "True"
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString & "'")
|
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString() & "'")
|
||||||
|
|
||||||
If TempDTValidaciones.Rows.Count > 0 Then
|
If TempDTValidaciones.Rows.Count > 0 Then
|
||||||
ReRow("DiaInhabil") = "True"
|
ReRow("DiaInhabil") = "True"
|
||||||
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString
|
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString()
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaDescanso
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaDescanso
|
||||||
ReRow("PorcentajePago") = "100"
|
ReRow("PorcentajePago") = "100"
|
||||||
Else
|
Else
|
||||||
@@ -668,7 +670,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString & "' AND CvePersonal = " & dRow(0).ToString)
|
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString() & "' AND CvePersonal = " & dRow(0).ToString())
|
||||||
|
|
||||||
If TempDTValidaciones.Rows.Count > 0 Then
|
If TempDTValidaciones.Rows.Count > 0 Then
|
||||||
ReRow("DiaVacacion") = "True"
|
ReRow("DiaVacacion") = "True"
|
||||||
@@ -697,21 +699,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
For Each dRow As DataRow In DtPersonal.Rows
|
For Each dRow As DataRow In DtPersonal.Rows
|
||||||
Dim Fecha As Date = FechaInicioPeriodo
|
Dim Fecha As Date = FechaInicioPeriodo
|
||||||
Dim ContadorFaltas As Integer = 0
|
Dim ContadorFaltas As Integer = 0
|
||||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString)
|
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||||
|
|
||||||
If registrosPersonal.Rows.Count > 0 Then
|
If registrosPersonal.Rows.Count > 0 Then
|
||||||
|
|
||||||
For x As Integer = 1 To (DiasPeriodo)
|
For x As Integer = 1 To (DiasPeriodo)
|
||||||
|
|
||||||
Dim ReRow As DataRow = Resultados.NewRow
|
Dim ReRow As DataRow = Resultados.NewRow
|
||||||
ReRow("CvePersonal") = dRow(0).ToString
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
|
|
||||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
ReRow("Fecha") = Fecha.ToString
|
ReRow("Fecha") = Fecha.ToString()
|
||||||
ReRow("Retraso") = "False"
|
ReRow("Retraso") = "False"
|
||||||
ReRow("Asistio") = "True"
|
ReRow("Asistio") = "True"
|
||||||
ReRow("Inconsistencia") = "False"
|
ReRow("Inconsistencia") = "False"
|
||||||
@@ -733,18 +735,18 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||||
Dim Asistencia As Boolean = True
|
Dim Asistencia As Boolean = True
|
||||||
|
|
||||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString & " AND Fecha = '" & Fecha.ToShortDateString & "'")
|
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha.ToShortDateString & "'")
|
||||||
|
|
||||||
If tabladelDia.Rows.Count > 0 Then
|
If tabladelDia.Rows.Count > 0 Then
|
||||||
ReRow("TipoCorto") = tabladelDia(0)("TipoCorto").ToString
|
ReRow("TipoCorto") = tabladelDia(0)("TipoCorto").ToString()
|
||||||
ReRow("CveAsistenciasInasistencias") = tabladelDia(0)("CveAsistenciasInasistencias").ToString
|
ReRow("CveAsistenciasInasistencias") = tabladelDia(0)("CveAsistenciasInasistencias").ToString()
|
||||||
Else
|
Else
|
||||||
ReRow("Asistio") = "False"
|
ReRow("Asistio") = "False"
|
||||||
ReRow("TipoCorto") = "F"
|
ReRow("TipoCorto") = "F"
|
||||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ReRow("Asistio").ToString = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||||
Resultados.Rows.Add(ReRow)
|
Resultados.Rows.Add(ReRow)
|
||||||
Fecha = Fecha.AddDays(1)
|
Fecha = Fecha.AddDays(1)
|
||||||
|
|
||||||
@@ -754,14 +756,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Dim ReRow As DataRow = Resultados.NewRow
|
Dim ReRow As DataRow = Resultados.NewRow
|
||||||
|
|
||||||
ReRow("CvePersonal") = dRow(0).ToString
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
ReRow("Asistio") = "False"
|
ReRow("Asistio") = "False"
|
||||||
ReRow("Fecha") = Fecha.ToString
|
ReRow("Fecha") = Fecha.ToString()
|
||||||
ReRow("Retraso") = "False"
|
ReRow("Retraso") = "False"
|
||||||
ReRow("Inconsistencia") = "False"
|
ReRow("Inconsistencia") = "False"
|
||||||
ReRow("Descanso") = "False"
|
ReRow("Descanso") = "False"
|
||||||
@@ -778,7 +780,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("TipoCorto") = ""
|
ReRow("TipoCorto") = ""
|
||||||
|
|
||||||
|
|
||||||
If ReRow("Asistio").ToString = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||||
Resultados.Rows.Add(ReRow)
|
Resultados.Rows.Add(ReRow)
|
||||||
Fecha = Fecha.AddDays(1)
|
Fecha = Fecha.AddDays(1)
|
||||||
|
|
||||||
@@ -845,7 +847,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ColumN = 3
|
ColumN = 3
|
||||||
|
|
||||||
For Each drow As DataRow In DTFechas.Rows
|
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).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
|
GVRegDatos.Columns(ColumN).Visible = True
|
||||||
ColumN = ColumN + 1
|
ColumN = ColumN + 1
|
||||||
Next
|
Next
|
||||||
@@ -867,7 +869,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
For Each drow As DataRow In DTFechas.Rows
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
|
|
||||||
filtro = " CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' "
|
filtro = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||||
ResumenDia = DtResultados.FiltraParametros(filtro)
|
ResumenDia = DtResultados.FiltraParametros(filtro)
|
||||||
|
|
||||||
TipoCorto = ""
|
TipoCorto = ""
|
||||||
@@ -876,33 +878,33 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
RRow(ColumN) = "-"
|
RRow(ColumN) = "-"
|
||||||
|
|
||||||
If ResumenDia(0)("Asistio").ToString = "True" Or ResumenDia(0)("TipoCorto").ToString = "A" Then
|
If ResumenDia(0)("Asistio").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||||
RRow(ColumN) = "A|" & filtro
|
RRow(ColumN) = "A|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("DiaVacacion").ToString = "True" Or ResumenDia(0)("TipoCorto").ToString = "V" Then
|
If ResumenDia(0)("DiaVacacion").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||||
RRow(ColumN) = "V|" & filtro
|
RRow(ColumN) = "V|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("Asistio").ToString = "False" Or ResumenDia(0)("TipoCorto").ToString = "F" Then
|
If ResumenDia(0)("Asistio").ToString() = "False" Or ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||||
RRow(ColumN) = "F|" & filtro
|
RRow(ColumN) = "F|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("Retraso").ToString = "True" Or ResumenDia(0)("TipoCorto").ToString = "R" Then
|
If ResumenDia(0)("Retraso").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||||
RRow(ColumN) = "R|" & filtro
|
RRow(ColumN) = "R|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("FaltaRetraso").ToString = "True" Or TipoCorto = "FR" Then
|
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Or TipoCorto = "FR" Then
|
||||||
RRow(ColumN) = "FR|" & filtro
|
RRow(ColumN) = "FR|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("Descanso").ToString = "True" Or ResumenDia(0)("DiaInhabil").ToString = "True" Then
|
If ResumenDia(0)("Descanso").ToString() = "True" Or ResumenDia(0)("DiaInhabil").ToString() = "True" Then
|
||||||
RRow(ColumN) = "D|" & filtro
|
RRow(ColumN) = "D|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("Inconsistencia").ToString = "True" Then
|
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||||
RRow(ColumN) = "IN|" & filtro
|
RRow(ColumN) = "IN|" & filtro
|
||||||
If ResumenDia(0)("Descanso").ToString = "True" Then
|
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "IND|" & filtro
|
RRow(ColumN) = "IND|" & filtro
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -910,7 +912,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
DTTempAsistencias = DTAsistenciasInasistenciasReg.FiltraParametros(filtro)
|
DTTempAsistencias = DTAsistenciasInasistenciasReg.FiltraParametros(filtro)
|
||||||
If DTTempAsistencias.Rows.Count > 0 Then
|
If DTTempAsistencias.Rows.Count > 0 Then
|
||||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString
|
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||||
Else
|
Else
|
||||||
TipoCorto = "F"
|
TipoCorto = "F"
|
||||||
End If
|
End If
|
||||||
@@ -931,7 +933,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Dim SalidaTiempo As Integer = (Now - medida).TotalSeconds.ToString.ToEntero
|
Dim SalidaTiempo As Integer = (Now - medida).TotalSeconds.ToString().ToEntero
|
||||||
SalidaTiempo = SalidaTiempo
|
SalidaTiempo = SalidaTiempo
|
||||||
DtDatosTabla = dt
|
DtDatosTabla = dt
|
||||||
|
|
||||||
@@ -1022,7 +1024,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
ColumN = 3
|
ColumN = 3
|
||||||
For Each drow As DataRow In DTFechas.Rows
|
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).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
|
GVRegDatos.Columns(ColumN).Visible = True
|
||||||
ColumN = ColumN + 1
|
ColumN = ColumN + 1
|
||||||
Next
|
Next
|
||||||
@@ -1036,14 +1038,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ColumN = 2
|
ColumN = 2
|
||||||
For Each drow As DataRow In DTFechas.Rows
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
|
|
||||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' "
|
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 & "' ")
|
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||||
|
|
||||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' ")
|
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||||
Dim TipoCorto As String = ""
|
Dim TipoCorto As String = ""
|
||||||
|
|
||||||
If DTTempAsistencias.Rows.Count > 1 Then
|
If DTTempAsistencias.Rows.Count > 1 Then
|
||||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString
|
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoCorto <> "" Then
|
If TipoCorto <> "" Then
|
||||||
@@ -1082,40 +1084,40 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
RRow(ColumN) = "-"
|
RRow(ColumN) = "-"
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||||
|
|
||||||
If ResumenDia(0)("Asistio").ToString = "True" Then
|
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||||
RRow(ColumN) = "A|" & filtro
|
RRow(ColumN) = "A|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("DiaVacacion").ToString = "True" Then
|
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||||
RRow(ColumN) = "V" & "|" & filtro
|
RRow(ColumN) = "V" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Asistio").ToString = "False" Then
|
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||||
RRow(ColumN) = "F" & "|" & filtro
|
RRow(ColumN) = "F" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Retraso").ToString = "True" Then
|
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "R" & "|" & filtro
|
RRow(ColumN) = "R" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("FaltaRetraso").ToString = "True" Then
|
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "FR" & "|" & filtro
|
RRow(ColumN) = "FR" & "|" & filtro
|
||||||
lblModalMensaje.Text = "Falta por retardo"
|
lblModalMensaje.Text = "Falta por retardo"
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Descanso").ToString = "True" Then
|
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "D" & "|" & filtro
|
RRow(ColumN) = "D" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Inconsistencia").ToString = "True" Then
|
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||||
RRow(ColumN) = "IN" & "|" & filtro
|
RRow(ColumN) = "IN" & "|" & filtro
|
||||||
|
|
||||||
If ResumenDia(0)("Descanso").ToString = "True" Then
|
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "IND" & "|" & filtro
|
RRow(ColumN) = "IND" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "S" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||||
RRow(ColumN) = "S" & "|" & filtro
|
RRow(ColumN) = "S" & "|" & filtro
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "M" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||||
RRow(ColumN) = "M" & "|" & filtro
|
RRow(ColumN) = "M" & "|" & filtro
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1131,38 +1133,38 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "A" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||||
RRow(ColumN) = "A" & "|" & filtro
|
RRow(ColumN) = "A" & "|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "V" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||||
RRow(ColumN) = "V" & "|" & filtro
|
RRow(ColumN) = "V" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "F" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||||
RRow(ColumN) = "F" & "|" & filtro
|
RRow(ColumN) = "F" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "R" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||||
RRow(ColumN) = "R" & "|" & filtro
|
RRow(ColumN) = "R" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If TipoCorto = "FR" Then
|
If TipoCorto = "FR" Then
|
||||||
RRow(ColumN) = "FR" & "|" & filtro
|
RRow(ColumN) = "FR" & "|" & filtro
|
||||||
lblModalMensaje.Text = "Falta por retardo"
|
lblModalMensaje.Text = "Falta por retardo"
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "D" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||||
RRow(ColumN) = "D" & "|" & filtro
|
RRow(ColumN) = "D" & "|" & filtro
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "I" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||||
RRow(ColumN) = "I" & "|" & filtro
|
RRow(ColumN) = "I" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "C" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||||
RRow(ColumN) = "C" & "|" & filtro
|
RRow(ColumN) = "C" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "S" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||||
RRow(ColumN) = "S" & "|" & filtro
|
RRow(ColumN) = "S" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString = "M" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||||
RRow(ColumN) = "M" & "|" & filtro
|
RRow(ColumN) = "M" & "|" & filtro
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1193,58 +1195,63 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
respuesta.Columns.Add("ENTRADACOMIDA", System.Type.GetType("System.TimeSpan"))
|
respuesta.Columns.Add("ENTRADACOMIDA", System.Type.GetType("System.TimeSpan"))
|
||||||
respuesta.Columns.Add("SALIDA", System.Type.GetType("System.TimeSpan"))
|
respuesta.Columns.Add("SALIDA", System.Type.GetType("System.TimeSpan"))
|
||||||
Dim Drow As DataRow = respuesta.NewRow
|
Dim Drow As DataRow = respuesta.NewRow
|
||||||
|
Dim drp As DataRow = Nothing
|
||||||
|
If DTHorarioPersonal.Rows.Count > 0 Then
|
||||||
|
drp = DTHorarioPersonal(0)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||||
|
|
||||||
Select Case diaSemana
|
Select Case diaSemana
|
||||||
Case 0
|
Case 0
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Domingo").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("DomingoSalida").ToString()))
|
||||||
|
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 1
|
Case 1
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Lunes").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("LunesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 2
|
Case 2
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Martes").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MartesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 3
|
Case 3
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Miercoles").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MiercolesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 4
|
Case 4
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Jueves").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("JuevesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 5
|
Case 5
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Viernes").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("ViernesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 6
|
Case 6
|
||||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Sabado").ToString)
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoEntrada").ToString)
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoSalidaComida").ToString)
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoEntradaComida").ToString)
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoSalida").ToString)
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("SabadoSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -1285,14 +1292,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
If DTNomPeriodos.Rows.Count > 0 Then
|
If DTNomPeriodos.Rows.Count > 0 Then
|
||||||
|
|
||||||
FechaInicialPeriodos = DTNomPeriodos(DTNomPeriodos.Rows.Count - 1)("FechaFin").ToString.ToDate
|
FechaInicialPeriodos = DTNomPeriodos(DTNomPeriodos.Rows.Count - 1)("FechaFin").ToString().ToDate
|
||||||
|
|
||||||
For Each Row As DataRow In DTNomPeriodos.Rows
|
For Each Row As DataRow In DTNomPeriodos.Rows
|
||||||
Dim Drow As DataRow = DTRespuesta.NewRow
|
Dim Drow As DataRow = DTRespuesta.NewRow
|
||||||
Drow("Valor") = Row("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy") & "-" & Row("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy") & "-" & Row("Numero").ToString
|
Drow("Valor") = Row("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy") & "-" & Row("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy") & "-" & Row("Numero").ToString()
|
||||||
Drow("Texto") = Row("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy") & " - " & Row("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy") & " #" & Row("Numero").ToString & " Cerrado"
|
Drow("Texto") = Row("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy") & " - " & Row("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy") & " #" & Row("Numero").ToString() & " Cerrado"
|
||||||
Drow("Numero") = Row("Numero").ToString
|
Drow("Numero") = Row("Numero").ToString()
|
||||||
Drow("Orden") = ContadorOrden.ToString
|
Drow("Orden") = ContadorOrden.ToString()
|
||||||
DTRespuesta.Rows.Add(Drow)
|
DTRespuesta.Rows.Add(Drow)
|
||||||
ContadorOrden += 1
|
ContadorOrden += 1
|
||||||
Next
|
Next
|
||||||
@@ -1311,7 +1318,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
While FechaLoop <= Now
|
While FechaLoop <= Now
|
||||||
Dim Drow As DataRow = DTRespuesta.NewRow
|
Dim Drow As DataRow = DTRespuesta.NewRow
|
||||||
Drow("Orden") = ContadorOrden.ToString
|
Drow("Orden") = ContadorOrden.ToString()
|
||||||
ContadorOrden += 1
|
ContadorOrden += 1
|
||||||
|
|
||||||
'Quincenal
|
'Quincenal
|
||||||
@@ -1578,7 +1585,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias.FiltraParametros(" CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa & " AND TipoCorto = '" & Instruccion & "' ")
|
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias.FiltraParametros(" CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa & " AND TipoCorto = '" & Instruccion & "' ")
|
||||||
|
|
||||||
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||||
CveEstado = DTTipoAsistenciaInasistencia(0)(0).ToString.ToEntero
|
CveEstado = DTTipoAsistenciaInasistencia(0)(0).ToString().ToEntero
|
||||||
Else
|
Else
|
||||||
CveEstado = -1
|
CveEstado = -1
|
||||||
End If
|
End If
|
||||||
@@ -1596,7 +1603,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
RegistraScript("$('#divDetallesDia').modal({ backdrop: 'static', keyboard: false});")
|
RegistraScript("$('#divDetallesDia').modal({ backdrop: 'static', keyboard: false});")
|
||||||
|
|
||||||
DTDatos = DtResultados.FiltraParametros(Filtro)
|
DTDatos = DtResultados.FiltraParametros(Filtro)
|
||||||
lblModalFecha.Text = DTDatos(0)("Fecha").ToString.ToDate.ToString("dd/MM/yyyy")
|
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
lnkModalImg.Text = ""
|
lnkModalImg.Text = ""
|
||||||
|
|
||||||
@@ -1727,11 +1734,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim temtDt As New DataTable
|
Dim temtDt As New DataTable
|
||||||
temtDt = DtResultados.FiltraParametros(FiltroAplicado)
|
temtDt = DtResultados.FiltraParametros(FiltroAplicado)
|
||||||
|
|
||||||
Dim fecha As String = temtDt(0)("Fecha").ToString
|
Dim fecha As String = temtDt(0)("Fecha").ToString()
|
||||||
Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString.ToEntero
|
Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString().ToEntero
|
||||||
Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
|
Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
|
||||||
|
|
||||||
Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString
|
Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
|
||||||
|
|
||||||
|
|
||||||
myRow = DtResultados.Select(filtro)
|
myRow = DtResultados.Select(filtro)
|
||||||
@@ -1746,7 +1753,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
||||||
|
|
||||||
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString
|
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
|
||||||
|
|
||||||
RegistraScript("$('#divDetallesDia').modal('hide');")
|
RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||||
Alert("Actualizado correctamente.")
|
Alert("Actualizado correctamente.")
|
||||||
@@ -1766,17 +1773,17 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
For Each dRow As DataRow In DtResultados.Rows
|
For Each dRow As DataRow In DtResultados.Rows
|
||||||
'Dim DDROW As DataRow = dRow
|
'Dim DDROW As DataRow = dRow
|
||||||
|
|
||||||
Dim _CvePersonal As Integer = dRow("CvePersonal").ToString.ToEntero
|
Dim _CvePersonal As Integer = dRow("CvePersonal").ToString().ToEntero
|
||||||
Dim _CveSubProyecto As Integer = dRow("CveSubProyecto").ToString.ToEntero
|
Dim _CveSubProyecto As Integer = dRow("CveSubProyecto").ToString().ToEntero
|
||||||
Dim _CveTuero As Integer = DdlTurno.SelectedValue.ToEntero
|
Dim _CveTuero As Integer = DdlTurno.SelectedValue.ToEntero
|
||||||
Dim _Fechas As Date = dRow("Fecha").ToString.ToDate
|
Dim _Fechas As Date = dRow("Fecha").ToString().ToDate
|
||||||
Dim _CveAsistenciasInasistencias As Integer = dRow("CveAsistenciasInasistencias").ToString.ToEntero
|
Dim _CveAsistenciasInasistencias As Integer = dRow("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
Dim _PorcentajePago As Double = Double.Parse(dRow("PorcentajePago").ToString)
|
Dim _PorcentajePago As Double = Double.Parse(dRow("PorcentajePago").ToString())
|
||||||
Dim _HorasDobles As Double = 0
|
Dim _HorasDobles As Double = 0
|
||||||
Dim _HorasTriples As Double = 0
|
Dim _HorasTriples As Double = 0
|
||||||
Dim _CveMotivoHoraExtra As Integer = -1
|
Dim _CveMotivoHoraExtra As Integer = -1
|
||||||
Dim _Observaciones As String = ""
|
Dim _Observaciones As String = ""
|
||||||
Dim _SalarioDiario As Double = dRow("SalarioDiario").ToString.ToDouble
|
Dim _SalarioDiario As Double = dRow("SalarioDiario").ToString().ToDouble
|
||||||
Dim _Semodifico As Integer = 0
|
Dim _Semodifico As Integer = 0
|
||||||
|
|
||||||
If objRh.PreAsistenciaRegistrosAdd(_CvePersonal, _CveSubProyecto, _CveTuero, _Fechas, _CveAsistenciasInasistencias, _PorcentajePago, _HorasDobles, _HorasTriples, _CveMotivoHoraExtra,
|
If objRh.PreAsistenciaRegistrosAdd(_CvePersonal, _CveSubProyecto, _CveTuero, _Fechas, _CveAsistenciasInasistencias, _PorcentajePago, _HorasDobles, _HorasTriples, _CveMotivoHoraExtra,
|
||||||
@@ -1830,17 +1837,17 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
||||||
|
|
||||||
|
|
||||||
' If Drow(x).ToString.Trim = "" Then
|
' If Drow(x).ToString().Trim = "" Then
|
||||||
' Exit For
|
' Exit For
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' Dim arrayData As String() = Drow.ToString.Split(separador)
|
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
||||||
|
|
||||||
' If arrayData.Length < 2 Then
|
' If arrayData.Length < 2 Then
|
||||||
' Exit For
|
' Exit For
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' TipoCorto = arrayData(0).ToString
|
' TipoCorto = arrayData(0).ToString()
|
||||||
' If TipoCorto = "FR" Then
|
' If TipoCorto = "FR" Then
|
||||||
' TipoCorto = "F"
|
' TipoCorto = "F"
|
||||||
' End If
|
' End If
|
||||||
@@ -1848,7 +1855,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
' TempDatos = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}'", TipoCorto))
|
' TempDatos = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}'", TipoCorto))
|
||||||
|
|
||||||
' If TempDatos.Rows.Count = 1 Then
|
' If TempDatos.Rows.Count = 1 Then
|
||||||
' CveAsisteciaInasistencia = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}' ", TipoCorto))(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
' CveAsisteciaInasistencia = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}' ", TipoCorto))(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||||
' Else
|
' Else
|
||||||
' CveAsisteciaInasistencia = -1
|
' CveAsisteciaInasistencia = -1
|
||||||
' Pendientes = True
|
' Pendientes = True
|
||||||
@@ -1862,16 +1869,16 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
' For Each Drow As DataRow In DtResultados.Rows
|
' For Each Drow As DataRow In DtResultados.Rows
|
||||||
|
|
||||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
||||||
' If Drow(x).ToString.Trim = "" Then
|
' If Drow(x).ToString().Trim = "" Then
|
||||||
' Exit For
|
' Exit For
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' Dim arrayData As String() = Drow.ToString.Split(separador)
|
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
||||||
|
|
||||||
' If arrayData.Length < 2 Then
|
' If arrayData.Length < 2 Then
|
||||||
' Exit For
|
' Exit For
|
||||||
' End If
|
' End If
|
||||||
' TipoCorto = arrayData(0).ToString
|
' TipoCorto = arrayData(0).ToString()
|
||||||
' Next
|
' Next
|
||||||
|
|
||||||
' Next
|
' Next
|
||||||
|
|||||||
10
vwd.webinfo
10
vwd.webinfo
@@ -134,6 +134,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user