diff --git a/GPS/PuntosDeInteres.aspx.vb b/GPS/PuntosDeInteres.aspx.vb
index 7da5bfd10..0029bed99 100644
--- a/GPS/PuntosDeInteres.aspx.vb
+++ b/GPS/PuntosDeInteres.aspx.vb
@@ -39,23 +39,22 @@ Partial Class GPS_PuntosDeInteres
End Sub
Private Sub CargaDatos()
- Dim gps As New ClsGPS
- If gps.PuntoDeInteresGrupoGet(-1, 1) Then
- GvGrupos.DataSource = gps.DtResultados
- Else
- GvGrupos.DataSource = Nothing
+ Dim ObjGPS As New ClsGPS
+ If ObjGPS.PuntoDeInteresGrupoGet(UsuarioActual.CveCliente, 1) Then
+ GvGrupos.DataSource = ObjGPS.DtResultados
End If
- If gps.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then
- GvPuntos.DataSource = gps.DtResultados
- GVPuntosInteres.DataSource = gps.DtResultados
- Else
- GvPuntos.DataSource = Nothing
- GVPuntosInteres.DataSource = Nothing
+
+ If ObjGPS.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then
+ GvPuntos.DataSource = ObjGPS.DtResultados
+ GVPuntosInteres.DataSource = ObjGPS.DtResultados
End If
- gps.Dispose()
+
+ ObjGPS.Dispose()
+
GvGrupos.DataBind()
GvPuntos.DataBind()
GVPuntosInteres.DataBind()
+
UpEditar.Update()
End Sub
@@ -65,7 +64,6 @@ Partial Class GPS_PuntosDeInteres
End If
End Sub
-
Protected Sub BtnAgregarPunto_Click(sender As Object, e As EventArgs) Handles BtnAgregarPunto.Click
Dim GPS As New ClsGPS
GPS.IniciaTransacSQL()
@@ -110,7 +108,7 @@ Partial Class GPS_PuntosDeInteres
Alert("Es necesario seleccionar un grupo de puntos", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
- If GPS.PuntoDeInteresGet(-1, -1, 1, HdnGrupo.Value.ToEntero) AndAlso GPS.DtResultados.Rows.Count > 0 Then
+ If GPS.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, HdnGrupo.Value.ToEntero) AndAlso GPS.DtResultados.Rows.Count > 0 Then
Dim ruta As String = ""
For Each row As DataRow In GPS.DtResultados.Rows
ruta += row("Punto").ToString.Replace("POINT (", "").Replace(")", ",")
diff --git a/GPS/RepPuntosDeInteres.aspx b/GPS/RepPuntosDeInteres.aspx
index 393b829f2..ffbeffbf4 100644
--- a/GPS/RepPuntosDeInteres.aspx
+++ b/GPS/RepPuntosDeInteres.aspx
@@ -1,46 +1,46 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/SiteGPS.master" AutoEventWireup="false" CodeFile="RepPuntosDeInteres.aspx.vb" Inherits="GPS_RepPuntosDeInteres" %>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
-
-
-
+
+
+
diff --git a/GPS/RepPuntosDeInteres.aspx.vb b/GPS/RepPuntosDeInteres.aspx.vb
index 3b818619e..444cad665 100644
--- a/GPS/RepPuntosDeInteres.aspx.vb
+++ b/GPS/RepPuntosDeInteres.aspx.vb
@@ -3,6 +3,7 @@
Imports Extensiones
Imports System.Data
Imports Microsoft.Reporting.WebForms
+Imports GemBox.Spreadsheet
Partial Class GPS_RepPuntosDeInteres
Inherits ClsPaginas
@@ -24,6 +25,14 @@ Partial Class GPS_RepPuntosDeInteres
ViewState("DtDatosReporte") = value
End Set
End Property
+ Private Property DtVisitas As DataTable
+ Get
+ Return If(IsNothing(ViewState("DtVisitas")), Nothing, CType(ViewState("DtVisitas"), DataTable))
+ End Get
+ Set(value As DataTable)
+ ViewState("DtVisitas") = value
+ End Set
+ End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -32,6 +41,7 @@ Partial Class GPS_RepPuntosDeInteres
End If
End Sub
Private Sub CargaDatos()
+ DtDatosReporte = Nothing
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
txtFechaI.Text = Now.AddDays(-7).ToString("dd/MM/yyyy")
@@ -66,6 +76,11 @@ Partial Class GPS_RepPuntosDeInteres
End Sub
Private Sub ReportePuntos(Dispositivos As String)
+ 'LIMPIAR REPORTE
+ If DtDatosReporte IsNot Nothing Then
+ DtDatosReporte.Dispose()
+ DtDatosReporte = Nothing
+ End If
Dim FechaI, FechaF As Date
Dim SBBody As New StringBuilder
@@ -83,11 +98,15 @@ Partial Class GPS_RepPuntosDeInteres
Try
For Each row As GridViewRow In GvPuntos.Rows
SBBody.Clear()
+
If row.FCCheckBox("chkGR").Checked Then
If ObjGPS.RepPuntosGet(row.DataKey("CvePuntoDeInteres").ToEntero, Dispositivos, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, UsuarioActual.CveCliente) Then
- DtDatosReporte = ObjGPS.DtResultados.Copy()
- GvBarra.DataSource = DtDatosReporte
+ If DtDatosReporte IsNot Nothing Then
+ DtDatosReporte.Merge(ObjGPS.DtResultados)
+ Else
+ DtDatosReporte = ObjGPS.DtResultados.Copy()
+ End If
Coords = SQLToGmaps(row.DataKey("Punto").ToString, "POINT")
SBBody.Append($"
")
@@ -98,7 +117,7 @@ Partial Class GPS_RepPuntosDeInteres
SBBody.Append($"
")
For Each Cve As String In DispositivosLista
If ObjGPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then
- SBBody.Append($"