This commit is contained in:
2023-04-04 07:11:25 -07:00
16 changed files with 11435 additions and 4499 deletions

View File

@@ -9387,6 +9387,9 @@ Public Class ClsPaginas
PaginaDict.Add("/RH/CatRegistroPatronal.aspx".ToUpper(), 1324)
PaginaDict.Add("/SAT/SolicitudesNominaSat.aspx".ToUpper(), 545)
PaginaDict.Add("/SAT/SolicitudesIngresoSat.aspx".ToUpper(), 1329)
PaginaDict.Add("/RH/RepAsistencias.aspx".ToUpper(), 1336)
#End Region
#Region "Sistema"
'--------------------- Páginas que deben tener restricción ---------------------

View File

@@ -2616,8 +2616,9 @@ Public Class ClsRH
End Try
Return Retorno
End Function
End Function
Public Function GetAsistencias(CvePersonal As Integer, CveClienteAsignado As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -2641,6 +2642,33 @@ Public Class ClsRH
OnError("Ocurrió un error al consultar las Asistencias del Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function RepGetAsistencias(Grupo As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CvePersonalPadre As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_RH_RepPersonalAsistenciasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@Grupo", SqlDbType.Int).Value = Grupo
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveClienteAsignado", SqlDbType.Int).Value = CveClienteAsignado
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CvePersonalPadre", SqlDbType.Int).Value = CvePersonalPadre
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar las Asistencias del Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
@@ -7283,7 +7311,7 @@ Public Class ClsRH
#End Region
#Region "Checador"
#Region "Checador"
Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorGet")
@@ -7356,6 +7384,45 @@ Public Class ClsRH
End Try
Return Retorno
End Function
Public Function AddRemoveChecadoresSubProyectos(CveChecador As Integer, CveSubProyecto As Integer, CveUsuario As Integer, Agreagar As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorSubProyectosAddRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Agreagar", SqlDbType.Bit).Value = Agreagar
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el sub proyecto", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetChecadoresSubProyectos(CveChecador As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_ChecadorSubProyectosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obteger los sub proyecto", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region " A C T I V I D A D E S"

View File

@@ -280,18 +280,18 @@ Partial Class Compras_ReembolsosComprobaciones
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
dt = dt.FiltraParametros("CveTipoCuenta = 7")
End If
'cuando es layout
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
dt = dt.FiltraParametros("UsaLayout = 1")
If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
dt = dt.FiltraParametros("CveTipoCuenta = 7")
End If
'cuando es layout
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
dt = dt.FiltraParametros("UsaLayout = 1")
End If
If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
End If
DdlCuenta.DataSource = dt
@@ -774,6 +774,11 @@ Partial Class Compras_ReembolsosComprobaciones
End If
If MsgError = "" Then
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
MsgError = "Detalle"
End If
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
ImporteMovto += Pago.OtroGastoIngreso ' si ajuste, sedebe de aplicar en su contraparte
@@ -781,10 +786,6 @@ Partial Class Compras_ReembolsosComprobaciones
MsgError = "Detalle"
End If
End If
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
MsgError = "Detalle"
End If
End If
Dim SaldoExcedente As Decimal = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal

View File

@@ -1042,7 +1042,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero).FiltroPrimeroValor("CveMoneda").ToEntero
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio,

View File

@@ -113,7 +113,7 @@
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -67,19 +67,19 @@
<Width>1.43285cm</Width>
</TablixColumn>
<TablixColumn>
<Width>5.73362cm</Width>
<Width>7.48903cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.51764cm</Width>
<Width>2.17368cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.99729cm</Width>
<Width>1.89146cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
<Width>2.25269cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
<Width>1.89147cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.1825cm</Width>
@@ -87,7 +87,7 @@
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.41479cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -99,10 +99,15 @@
<TextRuns>
<TextRun>
<Value>Código</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
@@ -130,10 +135,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -148,10 +150,15 @@
<TextRuns>
<TextRun>
<Value>Personal</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
@@ -179,10 +186,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -197,10 +201,15 @@
<TextRuns>
<TextRun>
<Value>Asistencias</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
@@ -228,10 +237,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -246,10 +252,15 @@
<TextRuns>
<TextRun>
<Value>% de Pago</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
@@ -277,10 +288,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -295,10 +303,15 @@
<TextRuns>
<TextRun>
<Value>Horas Dobles</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName>
@@ -326,10 +339,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -344,10 +354,15 @@
<TextRuns>
<TextRun>
<Value>Horas Triples</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox7</rd:DefaultName>
@@ -375,10 +390,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -393,10 +405,15 @@
<TextRuns>
<TextRun>
<Value>Firma</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName>
@@ -424,10 +441,7 @@
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<BackgroundColor>Silver</BackgroundColor>
</Style>
</Textbox>
</CellContents>
@@ -435,7 +449,7 @@
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.36188cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -447,7 +461,9 @@
<TextRuns>
<TextRun>
<Value>=Fields!Codigo.Value</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -457,7 +473,7 @@
<Style>
<Border>
<Color>Gray</Color>
<Style>Solid</Style>
<Style>None</Style>
<Width>0.5pt</Width>
</Border>
<TopBorder>
@@ -480,10 +496,6 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
@@ -498,7 +510,9 @@
<TextRuns>
<TextRun>
<Value>=Fields!Nombre.Value</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -531,10 +545,6 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
@@ -549,7 +559,9 @@
<TextRuns>
<TextRun>
<Value>=Fields!AsistenciasInasistencias.Value</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -582,10 +594,6 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
@@ -601,6 +609,7 @@
<TextRun>
<Value>=Fields!PorcentajePago.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>0;(0)</Format>
</Style>
</TextRun>
@@ -615,13 +624,8 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -634,7 +638,9 @@
<TextRuns>
<TextRun>
<Value>=IIf(Fields!HorasDobles.Value&gt;0,Fields!HorasDobles.Value.ToString(),"")</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -667,10 +673,6 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
@@ -685,7 +687,9 @@
<TextRuns>
<TextRun>
<Value>=IIf(Fields!HorasTriples.Value&gt;0,Fields!HorasTriples.Value.ToString(),"")</Value>
<Style />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -718,10 +722,6 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
@@ -736,7 +736,9 @@
<TextRuns>
<TextRun>
<Value />
<Style />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -769,10 +771,6 @@
<Style>Solid</Style>
<Width>0.5pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
@@ -805,8 +803,8 @@
<DataSetName>DataSet1</DataSetName>
<Top>3.2953cm</Top>
<Left>0.31432cm</Left>
<Height>1.2cm</Height>
<Width>18.8639cm</Width>
<Height>0.77667cm</Height>
<Width>19.31368cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -901,7 +899,7 @@
</Style>
</Image>
</ReportItems>
<Height>1.92637in</Height>
<Height>1.6972in</Height>
<Style />
</Body>
<Width>7.72756in</Width>
@@ -922,14 +920,16 @@
<Style />
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Top>0.14111cm</Top>
<Left>16.67822cm</Left>
<Left>16.00382cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<Width>3.62419cm</Width>
<Style>
<Border>
<Style>None</Style>

View File

@@ -21,74 +21,109 @@
</asp:Panel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="" id="PorletAsistencia">
<div class="portlet-title portlet-filterT" style="">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="collapse"></a>
<%--<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>--%>
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros ">
<ul class="list-inline">
<li>Cliente:
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="text-align: right">
Cliente:
</div>
<div class="col-md-1">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
<%--<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" Style="display: inline-block; width: 250px;" DataTextField="Nombre" DataValueField="CveCliente" Class="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</li>
<li id="DivProyectosAsignado" runat="server">
</div>
<div class="col-md-1" id="DivProyectosAsignado1" runat="server">
<asp:Label runat="server" ID="LblProyectoAsignado" AssociatedControlID="DdlProyecto">Proyecto: </asp:Label>
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block; width: 170px;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
</div>
<div class="col-md-1" id="DivProyectosAsignado2" runat="server">
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>
</div>
<div class="col-md-1" style="text-align: right">
<asp:Label runat="server" ID="LblSubProyectoAsignado" AssociatedControlID="DdlSubProyecto">SubProyecto: </asp:Label>
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block; width: 150px;" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>
</div>
<div class="col-md-1" style="text-align: right">
<asp:Label runat="server" AssociatedControlID="DdlTurno">Turno: </asp:Label>
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" Style="width: 130px;" DataTextField="Turno" DataValueField="CveTurno" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno"
Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>
</div>
<div class="col-md-1" style="text-align: right">
<asp:Label AssociatedControlID="DdlSupervisorOrganigrama" runat="server" Text="Supervisor:" Style="display: inline-block;"></asp:Label>
<asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block; width: 240px;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList>
</li>
<li style="width: 167px">
</div>
<div class="col-md-1" style="text-align: right">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistencia">F. Asistencia: </asp:Label>
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaAsistencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaAsistencia" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaAsistencia" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="font-size: 120%">
<ul class="list-inline">
</ul>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<table style="width: 100%;">
@@ -96,7 +131,7 @@
<td>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal" EmptyDataText="No se encontró Personal asignado al Proyecto o al Cliente" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveCliente" EmptyDataText="No se encontró Personal asignado al Proyecto o al Cliente" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>N°</HeaderTemplate>
@@ -110,6 +145,15 @@
<asp:Literal ID="LtlPersonal" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px" HeaderStyle-Width="100px" FooterStyle-HorizontalAlign="Left">
<HeaderTemplate>Cliente</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LtlCliente" CssClass="truncate" Width="100px" runat="server" Text='<%# Eval("Nombre") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Asistencia</HeaderTemplate>
<ItemTemplate>

View File

@@ -67,7 +67,8 @@ Partial Class RH_Asistencias
'DdlProyecto.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlProyecto, LblProyectoAsignado, LblSubProyectoAsignado)
DivProyectosAsignado.Visible = LblProyectoAsignado.Visible
DivProyectosAsignado1.Visible = LblProyectoAsignado.Visible
DivProyectosAsignado2.Visible = LblProyectoAsignado.Visible
DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
@@ -220,7 +221,9 @@ Partial Class RH_Asistencias
Dim OcurrioError As Boolean = False
For Each Row As GridViewRow In GV.Rows
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero, DdlCliente.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, TxtFechaAsistencia.Text.Trim.ToDate,
Dim CveCliente As Integer = Row.DataKey("CveCliente").ToEntero
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate,
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero, Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero, Row.FCTextBox("TxtObservaciones").Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -291,3 +294,4 @@ Partial Class RH_Asistencias
End Sub
End Class

View File

@@ -96,6 +96,33 @@
<label for="ChkEstatus">Estatus:</label>
<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>
<div class="modal-footer">

View File

@@ -57,6 +57,11 @@ public partial class RH_CatChecadores : ClsPaginas
TxtPuerto.Text = "";
BtnChecadorAgregar.Text = "Agregar";
divChkEstatus.Visible = false;
GvChecadorSubProyectos.DataSource = null;
GvChecadorSubProyectos.DataBind();
GvChecadorSubProyectos.Visible = false;
UpModalTiposD.Update();
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
}
@@ -64,6 +69,7 @@ public partial class RH_CatChecadores : ClsPaginas
protected void BtnChecadorAgregar_Click(object sender, EventArgs e)
{
ClsRH ObjRH = new ClsRH();
if (BtnChecadorAgregar.Text == "Agregar")
{
if (ObjRH.AddChecadores(TxtChecador.Text, DdlSubProyecto.SelectedValue.ToEntero(), TxtIPLocal.Text, TxtPuerto.Text, UsuarioActual.CveUsuario,CveModelo:DdlModelo.SelectedValue.ToEntero()))
@@ -73,10 +79,37 @@ 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;
break;
}
}
}
//if (errorProceso)
//{
// ObjRH.RollBack();
//}
//else
//{
// ObjRH.Commit();
//}
}
ObjRH.Dispose();
CargaDatos();
@@ -90,13 +123,30 @@ public partial class RH_CatChecadores : ClsPaginas
CveChecador = GvRow.DataKey("CveChecador").ToEntero();
TxtChecador.Text = GvRow.DataKey("Checador");
DdlSubProyecto.SelectedValue = GvRow.DataKey("CveSubProyecto");
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"));
DdlModelo.SelectedValue = GvRow.DataKey("CveModelo");
TxtIPLocal.Text = GvRow.DataKey("IPLocal");
TxtPuerto.Text = GvRow.DataKey("Puerto");
BtnChecadorAgregar.Text = "Actualizar";
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"));
}
@@ -114,4 +164,12 @@ public partial class RH_CatChecadores : ClsPaginas
}
ObjRH.Dispose();
}
protected void GvChecadorSubProyectos_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.FCCheckBox("Chk").Checked = e.Row.DataKey("CveChecador").ToEntero() > 0 ? true : false;
}
}
}

314
RH/RepAsistencias.aspx Normal file
View File

@@ -0,0 +1,314 @@
<%@ Page Title="RH - Captura de Asistencias" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAsistencias.aspx.vb" Inherits="RH_RepAsistencias" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
/* .adsCol div{
height:22px!important
}*/
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte Asistencias
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="text-align:right">
Grupo:
</div>
<div class="col-md-1">
<asp:DropDownList runat="server" CssClass="select2me" ID="DdlGrupo" Width="100%">
<asp:ListItem Value="1" Selected="True">Cliente</asp:ListItem>
<asp:ListItem Value="2">Personal</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" style="text-align:right">
Cliente:
</div>
<div class="col-md-1">
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
</div>
<div class="col-md-1" style="text-align:right">
<asp:Label runat="server" ID="LblSubProyectoAsignado" AssociatedControlID="DdlSubProyecto">SubProyecto: </asp:Label>
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block;" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
</asp:DropDownList>
</div>
<div class="col-md-1" style="text-align:right">
<asp:Label runat="server" AssociatedControlID="DdlTurno">Turno: </asp:Label>
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" style="text-align:right">
<asp:Label AssociatedControlID="DdlSupervisorOrganigrama" runat="server" Text="Supervisor:" Style="display: inline-block;"></asp:Label>
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block; ;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1" style="text-align:right">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistencia">F. Inicial: </asp:Label>
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaAsistencia" runat="server" MaxLength="10" Width="90px" Height="28px"></asp:TextBox><span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaAsistencia" class="btn default " Style="padding: 4px 8px;" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaAsistencia" runat="server" TargetControlID="TxtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaAsistencia" TargetControlID="TxtFechaAsistencia" PopupButtonID="LnkFechaAsistencia" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaAsistencia" runat="server" ControlToValidate="TxtFechaAsistencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Ingreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaAsistencia" runat="server" ControlToValidate="TxtFechaAsistencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Ingreso''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="text-align:right">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistenciaFin">F. Fin: </asp:Label>
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaAsistenciaFin" runat="server" MaxLength="10" Width="90px" Height="28px"></asp:TextBox><span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaAsistenciaFin" class="btn default " Style="padding: 4px 8px;" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaAsistenciaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaAsistenciaFin" PopupButtonID="LnkFechaAsistenciaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaAsistenciaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Ingreso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaAsistenciaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Ingreso''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<div class="col-md-12">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--'SUM(1) CountEmpleados, ISNULL(C.CveCliente,-1) AS CveCliente, ISNULL(C.Nombre,''Cliente sin Asignar'') AS Cliente ,RH.CvePersonal, RH.NombreCompleto, ',--%>
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="Ordenador,CvePersonal,Cliente,NombreCompleto"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="1" data-heightmenos="300"
Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="300px" >
<HeaderTemplate>Grupo</HeaderTemplate>
<ItemTemplate>
<asp:Label CssClass="truncate" ID ="LtlNombreCompleto" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function CargaClientes() {
$("#BtnCargarClientes").click();
}
</script>
</asp:Content>

184
RH/RepAsistencias.aspx.vb Normal file
View File

@@ -0,0 +1,184 @@
Imports System.Data
Imports Extensiones
Partial Class RH_RepAsistencias
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'CargaClientes()
DdlCliente.Attributes.Add("onclick", "CargaClientes();")
CargaProyecto()
CargaTurnos()
TxtFechaAsistenciaFin.Text = Now.ToShortDateString
TxtFechaAsistencia.Text = $"01/{Now.ToString("MM")}/{Now.Year}"
End If
End Sub
#Region "CargaCombos"
Private Sub CargaClientes()
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
DdlCliente.DataSource = ObjClientes.DtResultados
Else
DdlCliente.DataSource = Nothing
End If
ObjClientes.Dispose()
'Application("GlobalDTResponsable")
DdlCliente.DataBind()
End Sub
Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
CargaClientes()
DdlCliente.Attributes.Remove("onclick")
End Sub
Private Sub CargaProyecto()
'DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"})
'DdlProyecto.DataBind()
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoAsignado)
'DivProyectosAsignado.Visible = LblProyectoAsignado.Visible
DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaTurnos()
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
DdlTurno.DataBind()
End Sub
#End Region
'Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
' CargaSubProyecto()
'End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
LnkExportar.Visible = False
GvOcultarColumnas()
If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then
Dim objpersonal As New ClsRH
Dim dtTemp As New DataTable
Dim CveClienteAsignado As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
If objpersonal.RepGetAsistencias(DdlGrupo.SelectedValue.ToEntero, CveClienteAsignado, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, TxtFechaAsistencia.Text.Trim.ToDate,
TxtFechaAsistenciaFin.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlSupervisorOrganigrama.SelectedValue.ToEntero()) Then
dtTemp = objpersonal.DtResultados
GvMostrarColumnas(dtTemp)
GV.DataSource = dtTemp
If dtTemp.Rows.Count > 0 Then
LnkExportar.Visible = True
End If
Else
GV.DataSource = Nothing
End If
objpersonal.Dispose()
GV.DataBind()
UpDatos.Update()
UpAcciones.Update()
Else
Alert("La Fecha está fuera de los parámetros establecidos, por favor revise. Fecha: " & TxtFechaAsistencia.Text, TipoMensaje.MsgAdvertencia)
End If
End Sub
Private Sub GvOcultarColumnas()
Dim index = 1
For index = 1 To GV.Columns.Count - 1
CType(GV.Columns(index), BoundField).DataField = Nothing
Next
UpDatos.Update()
End Sub
Private Sub GvMostrarColumnas(dt As DataTable)
Dim index = 1
For index = 1 To dt.Columns.Count - 5
CType(GV.Columns(index + 4), BoundField).DataField = dt.Columns(index + 4).ColumnName
Dim tmpDate As Date
If (Date.TryParse(dt.Columns(index + 4).ColumnName, tmpDate)) Then
CType(GV.Columns(index + 4), BoundField).HeaderText = tmpDate.ToString("dd-MMM").Replace(".", "")
Else
CType(GV.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
End If
Next
UpDatos.Update()
End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("Ordenador").ToEntero = 0 Then
e.Row.CssClass = "SubTotales"
End If
e.Row.Attributes.Add("style", "max-height: 22px;")
End If
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
Dim SubProyecto As String = ""
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
SubProyecto = DdlSubProyecto.SelectedItem.Text
End If
Dim SbFiltros As New StringBuilder()
SbFiltros.Append($"Fecha Inicio: {TxtFechaAsistencia.Text} Fecha Fin: {TxtFechaAsistenciaFin.Text} ")
SbFiltros.Append($"SubProyecto: {SubProyecto}")
GV.ExportToExcelGembox("ReporteIncidencias", UsuarioActual, "Reporte Incidencias", "", DatosFiltros:=SbFiltros.ToString())
'GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}", "Anexo del Catálogo - Anual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
End Class