Se agregó formato para exportar a Excel y PDF
This commit is contained in:
@@ -6,6 +6,12 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LbPDF" runat="server" OnClick="LbPDF_Click"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LbExcel" runat="server" OnClick="LbExcel_Click"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Catálogo de Bancos
|
Catálogo de Bancos
|
||||||
|
|||||||
@@ -4,54 +4,67 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Bancos_CatBancos
|
Partial Class Bancos_CatBancos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Private Property DtBan As DataTable
|
||||||
If Not Page.IsPostBack Then
|
Get
|
||||||
ViewState("Orden") = ""
|
DtBan = DirectCast(ViewState("DtBan"), DataTable)
|
||||||
CargaDatos()
|
End Get
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Set(ByVal value As DataTable)
|
||||||
Dim ObjBancos As New ClsBancos
|
ViewState("DtBan") = value
|
||||||
If ObjBancos.GetBancos() Then
|
End Set
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
End Property
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
|
||||||
Else
|
|
||||||
Me.GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
ViewState("Orden") = ""
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
Public Sub CargaDatos()
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
Dim ObjBancos As New ClsBancos
|
||||||
Else
|
If ObjBancos.GetBancos() Then
|
||||||
CargaGrid("")
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
End If
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
End Sub
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
|
Else
|
||||||
|
Me.GvDatos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
ObjBancos.Dispose()
|
||||||
Dim ObjBancos As New ClsBancos
|
|
||||||
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
TxtBanco.Text = ""
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
TxtEjecutivo.Text = ""
|
Else
|
||||||
|
CargaGrid("")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
TxtBanco.Text = ""
|
||||||
|
TxtEjecutivo.Text = ""
|
||||||
TxtTelefono.Text = ""
|
TxtTelefono.Text = ""
|
||||||
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "G V D A T O S"
|
#Region "G V D A T O S"
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
@@ -80,6 +93,7 @@ Partial Class Bancos_CatBancos
|
|||||||
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -116,6 +130,7 @@ Partial Class Bancos_CatBancos
|
|||||||
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -178,4 +193,28 @@ Partial Class Bancos_CatBancos
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("PDF")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LbExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("Excel")
|
||||||
|
End Sub
|
||||||
|
Private Sub Imprime(Formato As String)
|
||||||
|
|
||||||
|
If DtBan IsNot Nothing AndAlso DtBan.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("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/RepBancos.rdlc", DtBan, params, "Reporte Bancos", Formato)
|
||||||
|
Else
|
||||||
|
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -6,14 +6,17 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
<li>
|
||||||
<li>
|
<asp:LinkButton ID="LBAdd" PostBackUrl="/Bancos/CuentasBancariasDetalle.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i> Agregar Cuenta Bancaria</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LBAdd" PostBackUrl="/Bancos/CuentasBancariasDetalle.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i> Agregar Cuenta Bancaria</asp:LinkButton>
|
<%-- <img alt="Nuevo Número de Cuenta Bancaria" onclick="document.location.href='/Bancos/CuentasBancariasDetalle.aspx'" src="/Imagenes/BotonAgregar.gif" style="cursor: pointer;" />--%>
|
||||||
<%-- <img alt="Nuevo Número de Cuenta Bancaria" onclick="document.location.href='/Bancos/CuentasBancariasDetalle.aspx'" src="/Imagenes/BotonAgregar.gif" style="cursor: pointer;" />--%>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
</ContentTemplate>
|
<asp:LinkButton ID="LbPDF" runat="server" OnClick="LbPDF_Click"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
</asp:UpdatePanel>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LbExcel" runat="server" OnClick="LbExcel_Click"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Catálogo de Número de Cuentas Bancarias / Cajas Chicas.
|
Catálogo de Número de Cuentas Bancarias / Cajas Chicas.
|
||||||
@@ -23,10 +26,10 @@
|
|||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta" EmptyDataText="No se encontraron Números de Cuentas Registrados" ToolTip="Listado de Números de Cuentas" CssClass="table table-striped table-advance table-hover" Style=" text-align: center;" GridLines="None" Width="100%">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta" EmptyDataText="No se encontraron Números de Cuentas Registrados" ToolTip="Listado de Números de Cuentas" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None" Width="100%">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="TipoCuenta" HeaderText="Tipo Cuenta" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}" DataNavigateUrlFields="CveCuenta" Target="_blank"/>
|
<asp:HyperLinkField DataTextField="TipoCuenta" HeaderText="Tipo Cuenta" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}" DataNavigateUrlFields="CveCuenta" Target="_blank" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>Banco</HeaderTemplate>
|
<HeaderTemplate>Banco</HeaderTemplate>
|
||||||
<ItemTemplate> <asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal></ItemTemplate>
|
<ItemTemplate> <asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -35,7 +38,7 @@
|
|||||||
<ItemTemplate> <asp:Literal ID="LtlNumCuenta" runat="server" Text='<%# Eval("NumCuenta", "{0}") %>'></asp:Literal></ItemTemplate>
|
<ItemTemplate> <asp:Literal ID="LtlNumCuenta" runat="server" Text='<%# Eval("NumCuenta", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>CLABE</HeaderTemplate>
|
<HeaderTemplate>CLABE</HeaderTemplate>
|
||||||
<ItemTemplate> <asp:Literal ID="LtlCLABE" runat="server" Text='<%# Eval("CLABE", "{0}") %>'></asp:Literal></ItemTemplate>
|
<ItemTemplate> <asp:Literal ID="LtlCLABE" runat="server" Text='<%# Eval("CLABE", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -47,22 +50,26 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Folio Inicial</HeaderTemplate>
|
<HeaderTemplate>Folio Inicial</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFInicial" runat="server" Text='<%# Eval("FInicial", "{0:d}") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlFInicial" runat="server" Text='<%# Eval("FInicial", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>Usuario</HeaderTemplate>
|
<HeaderTemplate>Usuario</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
|||||||
@@ -4,9 +4,21 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Bancos_CuentasBancarias
|
Partial Class Bancos_CuentasBancarias
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property DtBan As DataTable
|
||||||
|
Get
|
||||||
|
DtBan = DirectCast(ViewState("DtBan"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtBan") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
'Configuración
|
'Configuración
|
||||||
Private ReadOnly Property CveCuenta As Integer
|
Private ReadOnly Property CveCuenta As Integer
|
||||||
Get
|
Get
|
||||||
@@ -22,7 +34,7 @@ Partial Class Bancos_CuentasBancarias
|
|||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetBancosCuentas(-1) Then
|
If ObjBancos.GetBancosCuentas(-1) Then
|
||||||
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
Else
|
Else
|
||||||
Me.GvDatos.DataSource = Nothing
|
Me.GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -53,6 +65,7 @@ Partial Class Bancos_CuentasBancarias
|
|||||||
If ObjBancos.RemoveBancosCuentas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjBancos.RemoveBancosCuentas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
||||||
GlobalDTBancosCuentas(-1) = ObjBancos.DtResultados
|
GlobalDTBancosCuentas(-1) = ObjBancos.DtResultados
|
||||||
End If
|
End If
|
||||||
@@ -126,4 +139,27 @@ Partial Class Bancos_CuentasBancarias
|
|||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("PDF")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LbExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("Excel")
|
||||||
|
End Sub
|
||||||
|
Private Sub Imprime(Formato As String)
|
||||||
|
If DtBan IsNot Nothing AndAlso DtBan.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("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/CuentasBancarias.rdlc", DtBan, params, "Reporte de Cuentas Bancarias", Formato)
|
||||||
|
Else
|
||||||
|
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user