nuevo reporte en el modulo en cuestion
This commit is contained in:
@@ -31,6 +31,16 @@
|
|||||||
Reporte Indice Rotación de Personal
|
Reporte Indice Rotación de Personal
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton runat="server" ID="BtnImprimir" OnClick="BtnImprimir_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-file-pdf-o'></i>Imprimir"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -3,10 +3,24 @@ Option Explicit On
|
|||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Ventas_RepIndiceRotacionPersonal
|
Partial Class Ventas_RepIndiceRotacionPersonal
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property DTGvDatos As DataTable
|
||||||
|
Get
|
||||||
|
If ViewState("DTGvDatos") Is Nothing Then
|
||||||
|
Return New DataTable
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("DTGvDatos"), DataTable)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DTGvDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Sub Ventas_RepIndiceRotacionPersonal_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Ventas_RepIndiceRotacionPersonal_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
txtInicio.Text = Date.Now.AddDays(-30).ToString("dd/MM/yyyy")
|
txtInicio.Text = Date.Now.AddDays(-30).ToString("dd/MM/yyyy")
|
||||||
@@ -84,7 +98,7 @@ Partial Class Ventas_RepIndiceRotacionPersonal
|
|||||||
If rh.GetReporteRotacionPersonal(FechaInicio, FechaFin, CveTurno, CveProyecto, CveSubproyecto, UsuarioActual.Empresa.CveEmpresa) Then
|
If rh.GetReporteRotacionPersonal(FechaInicio, FechaFin, CveTurno, CveProyecto, CveSubproyecto, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
dTable = rh.DtResultados
|
dTable = rh.DtResultados
|
||||||
End If
|
End If
|
||||||
|
DTGvDatos = dTable
|
||||||
GVRegDatos.DataSource = dTable
|
GVRegDatos.DataSource = dTable
|
||||||
GVRegDatos.DataBind()
|
GVRegDatos.DataBind()
|
||||||
|
|
||||||
@@ -138,4 +152,29 @@ Partial Class Ventas_RepIndiceRotacionPersonal
|
|||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||||
|
'"Empresas/Grales/Formatos/ClienteHistorial.rdlc"
|
||||||
|
If GVRegDatos.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("FechaInicial", txtInicio.Text))
|
||||||
|
params.Add(New ReportParameter("FechaFinal", txtFin.Text))
|
||||||
|
params.Add(New ReportParameter("FechaRealizado", Date.Now().ToString()))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
|
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepIndiceRotacionPersonal.rdlc", DTGvDatos, params, "Reporte de Historial", "PDF")
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user