Limpieza modulos

This commit is contained in:
Oscar Irigoyen
2022-10-05 15:50:54 -07:00
parent 10f86c3f9f
commit 5a49bc984e
7 changed files with 2 additions and 534 deletions

View File

@@ -1,117 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepArqueosDetalle.aspx.vb" Inherits="Ventas_RepArqueosDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkPdf" runat="server" OnClick="LnkPdf_Click"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server" OnClick="LnkExportar_Click"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPdf" />
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light smmallpadding traspasorow bordered">
<div class="portlet-title">
<div class="caption font-green">
<span class="caption-subject bold uppercase" style="line-height: 2;">Ventas</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-12">
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
<div style="margin-right: 15px">
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron facturas"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
<Columns>
<asp:HyperLinkField HeaderText="Serie Folio" Target="_blank" DataTextField="SerieFolio" ItemStyle-Width="90px" DataTextFormatString="{0:N2}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Cliente" DataField="Cliente" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Sucursal" DataField="Sucursal" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Ret ISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="portlet light smmallpadding traspasorow bordered">
<div class="portlet-title">
<div class="caption font-green">
<span class="caption-subject bold uppercase" style="line-height: 2;">CUENTAS</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-12">
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
<div style="margin-right: 15px">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvCuentas.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCuentas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:GridView ID="GvCuentas" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
DataKeyNames=""
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
<Columns>
<asp:HyperLinkField HeaderText="Folio" Target="_blank" DataTextField="Folio" ItemStyle-Width="25%" DataTextFormatString="{0:N2}" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Numero de Cuenta" DataField="NumCuenta" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Right" />
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,108 +0,0 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Data
Partial Class Ventas_RepArqueosDetalle
Inherits ClsPaginas
#Region "P R O P I E D A D E S"
Private Property DtVentas As DataTable
Get
Return DirectCast(ViewState("DtVentas"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtVentas") = value
End Set
End Property
Private Property DtCuentas As DataTable
Get
Return DirectCast(ViewState("DtCuentas"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtCuentas") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim CveSubProyecto As Integer = -1
Dim Fecha As DateTime = Now
If Request("CveSubProyecto") IsNot Nothing Then
CveSubProyecto = Request("CveSubProyecto").ToString().ToEntero()
End If
If Request("Fecha") IsNot Nothing Then
Fecha = Request("Fecha").ToString().ToDate()
End If
CargaDatos(Fecha, CveSubProyecto)
End If
End Sub
Private Sub CargaDatos(Fecha As DateTime, CveSubProyecto As Integer)
LtlTitulo.Text = String.Format("Reporte de Arqueos Detalle: Fecha {0:dd/MM/yyyy}", Fecha)
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepArqueosDetalle(Fecha, CveSubProyecto, UsuarioActual.CveEmpresa) Then
DtVentas = ObjVentas.DataSetResultados.Tables(0).Copy()
DtCuentas = ObjVentas.DataSetResultados.Tables(1).Copy()
End If
ObjVentas.Dispose()
GvDatos.DataSource = DtVentas
GvCuentas.DataSource = DtCuentas
GvDatos.DataBind()
GvCuentas.DataBind()
UPDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("SerieFolio") = "Total" Then
e.Row.CssClass = "Totales"
End If
End If
End Sub
Protected Sub GvCuentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Folio") = "Total" Then
e.Row.CssClass = "Totales"
End If
End If
End Sub
Protected Sub GeneraPDF(Formato As String)
Dim params As List(Of ReportParameter) = New List(Of ReportParameter)()
Dim Imagen As System.IO.FileInfo = 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)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
params.Add(New ReportParameter("Encabezado", String.Format("Fecha:{0}", Request("Fecha").ToString().ToDate().ToString("dd/MM/yyyy"))))
Dim lrds As List(Of ReportDataSource) = New List(Of ReportDataSource)()
Dim rds As ReportDataSource = New ReportDataSource()
rds.Name = "DataSet1"
rds.Value = DtVentas
Dim rds2 As ReportDataSource = New ReportDataSource()
rds2.Name = "DataSet2"
rds2.Value = DtCuentas
lrds.Add(rds)
lrds.Add(rds2)
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RepArqueosDetalle.rdlc", lrds, params, "Rep Arqueos Detalle", Formato)
End Sub
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
GeneraPDF("PDF")
End Sub
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs)
GeneraPDF("EXCEL")
End Sub
End Class