From 29021be8a64d7a83de71714eec8eacd72f6ded58 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 16 Feb 2022 21:01:22 -0700 Subject: [PATCH] -- indicador diario detalle --- Acumuladores/RepIndicadorDiarioDetalle.aspx | 259 ++++++++++++++++++ .../RepIndicadorDiarioDetalle.aspx.vb | 67 +++++ App_Code/ClsAcumuladores.vb | 32 ++- App_Code/ClsPaginas.vb | 14 +- 4 files changed, 366 insertions(+), 6 deletions(-) create mode 100644 Acumuladores/RepIndicadorDiarioDetalle.aspx create mode 100644 Acumuladores/RepIndicadorDiarioDetalle.aspx.vb diff --git a/Acumuladores/RepIndicadorDiarioDetalle.aspx b/Acumuladores/RepIndicadorDiarioDetalle.aspx new file mode 100644 index 000000000..70cf16e06 --- /dev/null +++ b/Acumuladores/RepIndicadorDiarioDetalle.aspx @@ -0,0 +1,259 @@ +<%@ Page Title="Indicador diario detalle" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadorDiarioDetalle.aspx.vb" Inherits="Acumuladores_RepIndicadorDiarioDetalle" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + <%-- + +
+ +
+
+
--%> +
+ +
  • + Generar +
  • +
  • + Personalizar +
  • +
  • + Ver Dlls en pesos +
  • +
  • + Imprimir +
  • + + + + + + +
    + + Reporte de Productos Servicios + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    + Fecha Inicio: + +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + diff --git a/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb new file mode 100644 index 000000000..cd77622b5 --- /dev/null +++ b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb @@ -0,0 +1,67 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports System.IO +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports System.IO.Compression + +Partial Class Acumuladores_RepIndicadorDiarioDetalle + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + + CargaParametrosDetalle() + + End If + End Sub + + +#Region " CARGA DATOS INICIALES " + + + Private Sub CargaParametrosDetalle() + + Dim Opcion As Integer = If(Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToEntero() > 0, Request("Opcion").ToEntero(), -1) + + Dim CveSubProyecto As Integer = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1) + + + + End Sub +#End Region + +#Region " CARGA DATOS " + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click + CargaDatos() + UPDatos.Update() + End Sub + + Private Sub CargaDatos() + + Dim ObjAcum As New ClsAcumuladores() + + Dim FechaI, FechaF As Date + FechaI = txtFechaI.Text.ToDate + FechaF = txtFechaF.Text.ToDate + + If ObjAcum.GetRepIndicadorDiarioDetalle(FechaI, FechaF, 1, -1, UsuarioActual.CveEmpresa) Then + GvDatos.DataSource = ObjAcum.DtResultados + Else + GvDatos.DataSource = Nothing + End If + + ObjAcum.Dispose() + GvDatos.DataBind() + + End Sub + + +#End Region + + + + +End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 14962f888..6a8a46e45 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1135,7 +1135,7 @@ Public Class ClsAcumuladores End Function - Public Function GetRepIndicadorDiario(FechaInicio As Date, FechaFin As Date, CveSubProeycto As Integer, CveEmpresa As Integer) As Boolean + Public Function GetRepIndicadorDiario(FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1144,7 +1144,35 @@ Public Class ClsAcumuladores With SqlAdapter.SelectCommand.Parameters .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProeycto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + + SqlAdapter.Fill(Data) + Retorno = True + + Catch ex As SqlException + + OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + End Try + + Return Retorno + End Function + + Public Function GetRepIndicadorDiarioDetalle(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + + SqlDataAdapter("PA_Acum_RepIndicadorDiarioDetalleGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f7896eacb..0eb004041 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -2036,7 +2036,7 @@ Public Class ClsPaginas End Set End Property 'Variables para Ventas - Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable + Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional VendedorTipo As Integer = 1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTVendedores-{0}", CveEmpresa) 'sino existe, recarga los datos @@ -2047,10 +2047,15 @@ Public Class ClsPaginas End If If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows) + Dim StrSQL As New StringBuilder + StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) + If VendedorTipo >= 0 Then StrSQL.AppendFormat(" AND VendedorTipo = {0} ", VendedorTipo) + If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstatus = {0} ", If(Estatus = 1, True, False)) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) GlobalDTVendedores = Dv.ToTable Dv.Dispose() + Else GlobalDTVendedores = DirectCast(Application(AppNombre), DataTable) End If @@ -5633,7 +5638,8 @@ Public Class ClsPaginas PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034) PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035) PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036) - PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 2055) + PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 730) + PaginaDict.Add("/Acumuladores/RepIndicadorDiarioDetalle.aspx".ToUpper(), 730) PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543) PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032) @@ -7075,7 +7081,7 @@ Public Class ClsPaginas 'Si no tiene CBB, SE GENERA If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() - CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB) + CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total, Vta.FolioFiscal, RutaCBB) End If 'ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme.Replace("https", "http"), Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)