Formatos de Grids en Clientes

This commit is contained in:
janeth arvizu
2019-10-10 12:35:36 -07:00
parent d8391b6298
commit 009d9375fd
3 changed files with 91 additions and 51 deletions

View File

@@ -1261,7 +1261,7 @@
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpRepProveedoresPagosBancos" Visible="false">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpRepProveedoresPagosBancos" >
<ContentTemplate>
<asp:LinkButton ID="LnkCotizacionesPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkCotizacionesExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
@@ -1758,7 +1758,7 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel2" Visible="false">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel2">
<ContentTemplate>
<asp:LinkButton ID="LnkCxCActivasPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkCxCActivasExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
@@ -1841,7 +1841,7 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel6" Visible="false">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel6">
<ContentTemplate>
<asp:LinkButton ID="LnkHistorialCxCPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkHistorialCxCExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
@@ -1935,7 +1935,7 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel7" Visible="false">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel7">
<ContentTemplate>
<asp:LinkButton ID="LnkAnticipoClientePDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkAnticipoClienteExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
@@ -1991,7 +1991,7 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel8" Visible="false">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel8">
<ContentTemplate>
<asp:LinkButton ID="LnkAnticipoHistorialPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkAnticipoHistorialExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
@@ -2069,7 +2069,7 @@
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel9" Visible="false">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel9">
<ContentTemplate>
<asp:LinkButton ID="LnkCuentasBancariasPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkCuentasBancariasExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>

View File

@@ -399,6 +399,47 @@ Partial Class Clientes
Set(value As DataTable)
ViewState("DtPagos") = value
End Set
End Property
Private Property DtCotizaciones As DataTable
Get
Return CType(ViewState("DtCotizaciones"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtCotizaciones") = value
End Set
End Property
Private Property DtCxCActivas As DataTable
Get
Return CType(ViewState("DtCxCActivas"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtCxCActivas") = value
End Set
End Property
Private Property DtHistorialCxC As DataTable
Get
Return CType(ViewState("DtHistorialCxC"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtHistorialCxC") = value
End Set
End Property
Private Property DtClientesAnticipo As DataTable
Get
Return CType(ViewState("DtClientesAnticipo"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtClientesAnticipo") = value
End Set
End Property
Private Property DtAnticipoHistorial As DataTable
Get
Return CType(ViewState("DtAnticipoHistorial"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtAnticipoHistorial") = value
End Set
End Property
'Private Property EstatusAnteriorCliente As Boolean
' Get
@@ -1654,16 +1695,20 @@ Partial Class Clientes
'Dim ObjClientesVentas As New ClsMovimientos
'CxC Clientes
If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
GvCxC.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento")
DtCxCActivas = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento")
GvCxC.DataSource = DtCxCActivas
'solo tomo los 10 ultimos mas el totalizador general
Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
DtHistorialCxC = dt
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
GvCxCHistorial.DataSource = dt.AsEnumerable().Take(22).CopyToDataTable()
End If
Retorno = True
Else
GvCxC.DataSource = Nothing
DtCxCActivas = Nothing
GvCxCHistorial.DataSource = Nothing
DtHistorialCxC = Nothing
End If
@@ -1676,11 +1721,15 @@ Partial Class Clientes
Private Sub CargaAnticipos(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 ")
GVAnticiposHistorial.DataSource = ObjMovtos.DtResultados.FiltraParametros("Saldo <= 0 ")
DtClientesAnticipo = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 ")
GVAnticipos.DataSource = DtClientesAnticipo
DtAnticipoHistorial = ObjMovtos.DtResultados.FiltraParametros("Saldo <= 0 ")
GVAnticiposHistorial.DataSource = DtAnticipoHistorial
Else
GVAnticipos.DataSource = Nothing
DtClientesAnticipo = Nothing
GVAnticiposHistorial.DataSource = Nothing
DtAnticipoHistorial = Nothing
End If
ObjMovtos.Dispose()
GVAnticipos.DataBind()
@@ -4014,6 +4063,7 @@ Partial Class Clientes
LtlFactorCotVentas.Text = If(LtlCantidad.Text.ToEntero > 0, (LtlCantidadCotizaciones.Text.ToEntero / LtlCantidad.Text.ToEntero).FormatoNumero, "0.00")
'Carga Grid
GvCot.DataSource = ObjClientes.DtResultados
DtCotizaciones = ObjClientes.DtResultados
If UsuarioActual.Empresa.UsaOS Then
GvCot.Columns(9).Visible = True
@@ -4026,9 +4076,11 @@ Partial Class Clientes
LtlCantidadCotizaciones.Text = "0"
LtlFactorCotVentas.Text = "0.00"
GvCot.DataSource = Nothing
DtCotizaciones = Nothing
End If
Else
GvCot.DataSource = Nothing
DtCotizaciones = Nothing
End If
ObjClientes.Dispose()
GvCot.DataBind()
@@ -9793,45 +9845,45 @@ Partial Class Clientes
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
End Sub
Private Sub LnkCotizacionesExcel_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesExcel.Click
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("Excel", DtCotizaciones, "RepClientesCotizaciones")
End Sub
Private Sub LnkCxCActivasPDF_Click(sender As Object, e As EventArgs) Handles LnkCxCActivasPDF.Click
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("PDF", DtCxCActivas, "RepClientesCxCActivas")
End Sub
Private Sub LnkCxCActivasExcel_Click(sender As Object, e As EventArgs) Handles LnkCxCActivasExcel.Click
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("Excel", DtCxCActivas, "RepClientesCxCActivas")
End Sub
Private Sub LnkHistorialCxCPDF_Click(sender As Object, e As EventArgs) Handles LnkHistorialCxCPDF.Click
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("PDF", DtHistorialCxC, "RepClientesHistorialCxC")
End Sub
Private Sub LnkHistorialCxCExcel_Click(sender As Object, e As EventArgs) Handles LnkHistorialCxCExcel.Click
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("Excel", DtHistorialCxC, "RepClientesHistorialCxC")
End Sub
Private Sub LnkAnticipoClientePDF_Click(sender As Object, e As EventArgs) Handles LnkAnticipoClientePDF.Click
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("PDF", DtClientesAnticipo, "RepClientesAnticipos")
End Sub
Private Sub LnkAnticipoClienteExcel_Click(sender As Object, e As EventArgs) Handles LnkAnticipoClienteExcel.Click
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("Excel", DtClientesAnticipo, "RepClientesAnticipos")
End Sub
Private Sub LnkAnticipoHistorialPDF_Click(sender As Object, e As EventArgs) Handles LnkAnticipoHistorialPDF.Click
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("PDF", DtAnticipoHistorial, "RepClientesAnticipoHistorial")
End Sub
Private Sub LnkAnticipoHistorialExcel_Click(sender As Object, e As EventArgs) Handles LnkAnticipoHistorialExcel.Click
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("Excel", DtAnticipoHistorial, "RepClientesAnticipoHistorial")
End Sub
Private Sub LnkCuentasBancariasPDF_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancariasPDF.Click
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("PDF", DTCuentasBancos, "RepClientesCuentasBancarias")
End Sub
Private Sub LnkCuentasBancariasExcel_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancariasExcel.Click
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepClientesCotizaciones")
ImprimeGridsProveedores("Excel", DTCuentasBancos, "RepClientesCuentasBancarias")
End Sub
Private Sub ImprimeGridsProveedores(Formato As String, DtTemp As DataTable, NombreFormato As String)