commit general local oscar
This commit is contained in:
@@ -61,11 +61,18 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
|||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
|
'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
|
||||||
|
' e.Row.CssClass = "SubTotales2"
|
||||||
|
'End If
|
||||||
|
If e.Row.DBCampo("TipoHeader").ToString = "1" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then
|
||||||
e.Row.CssClass = "SubTotales2"
|
e.Row.CssClass = "SubTotales2"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -1597,7 +1597,7 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function CancelarBancos_IE(CveUsuario As Integer, CveIE As Integer, MesAnterior As Boolean, IdPoliza As Integer, Optional FechaCancelacion As Date = MinFecha, Optional TipoMovimiento As Integer = 1) As Boolean
|
Public Function CancelarBancos_IE(CveUsuario As Integer, CveIE As Integer, MesAnterior As Boolean, IdPoliza As Integer, FolioPoliza As Integer, Optional FechaCancelacion As Date = MinFecha, Optional TipoMovimiento As Integer = 1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Banc_IECancelar")
|
DataAdapter("PA_Banc_IECancelar")
|
||||||
@@ -1607,6 +1607,7 @@ Public Class ClsBancos
|
|||||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
.Add("@MesAnterior", SqlDbType.Bit).Value = MesAnterior
|
.Add("@MesAnterior", SqlDbType.Bit).Value = MesAnterior
|
||||||
.Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
|
.Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
|
||||||
|
.Add("@FolioPoliza", SqlDbType.Int).Value = FolioPoliza
|
||||||
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
|
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
|
||||||
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
|
|
||||||
Public Function GetProveedoresAuxiliar(CveProveedor As Integer, CveConceptoContable As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer,
|
Public Function GetProveedoresAuxiliar(CveProveedor As Integer, CveConceptoContable As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer,
|
||||||
Optional Opcion As Integer = 1, Optional CveTipoProveedor As Integer = -1) As Boolean
|
Optional Opcion As Integer = 1, Optional CveTipoProveedor As Integer = -1, Optional Contabilizable As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_ProveedoresAuxiliar")
|
DataAdapter("PA_Conta_ProveedoresAuxiliar")
|
||||||
@@ -402,6 +402,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||||
|
.Add("@Contabilizable", SqlDbType.Int).Value = Contabilizable
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -1477,7 +1478,7 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ObjConta.RollBack()
|
If Not ContaCompartida Then ObjConta.RollBack()
|
||||||
OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
|
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
|
||||||
Retorno = False
|
Retorno = False
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ Public Class ClsEdocumentacion
|
|||||||
#Region "D O C U M E N T A C I O N "
|
#Region "D O C U M E N T A C I O N "
|
||||||
|
|
||||||
|
|
||||||
Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = 1) As Boolean
|
Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Edoc_DocumentacionGet")
|
DataAdapter("PA_Edoc_DocumentacionGet")
|
||||||
@@ -435,7 +435,7 @@ Public Class ClsEdocumentacion
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function DocumentacionTipoGet(CveEmpresa As Integer, Optional Modulo As Integer = 1) As Boolean
|
Public Function DocumentacionTipoGet(CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@@ -4566,7 +4566,9 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
|
PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
|
||||||
PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
|
PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
|
||||||
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
||||||
|
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 366)
|
||||||
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
||||||
|
PaginaDict.Add("/Ventas/RepVentas.aspx?Op=Cot".ToUpper(), 367)
|
||||||
PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
|
PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
|
||||||
PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
|
PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
|
||||||
PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
|
PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
|
||||||
@@ -4644,7 +4646,7 @@ Public Class ClsPaginas
|
|||||||
'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
|
'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
|
||||||
'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
|
'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
|
||||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
|
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
|
||||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
|
'PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
|
||||||
PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
|
||||||
|
|||||||
@@ -3061,7 +3061,7 @@ Namespace Modelos
|
|||||||
CveCuentaContabilizacion = 0
|
CveCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
ObjFactura.SeGuardoPrePoliza = True
|
ObjFactura.SeGuardoPrePoliza = True
|
||||||
@@ -4375,7 +4375,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso ObjFactura.TipoDocto.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "NC") Then
|
If UsuarioActual.CveEmpresa = 119 AndAlso ObjFactura.TipoDocto.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "Egs", "Dev") Then
|
||||||
AutoConta = False
|
AutoConta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -430,6 +430,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||||
SeContabilizo = True
|
SeContabilizo = True
|
||||||
Else
|
Else
|
||||||
|
ErrorRegistrar = True
|
||||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -437,10 +438,12 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
If Not ErrorRegistrar And SeContabilizo Then
|
If Not ErrorRegistrar And SeContabilizo Then
|
||||||
|
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
|
ObjContPaq.Commit()
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
CargaDatosCuentas()
|
CargaDatosCuentas()
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
|
ObjContPaq.Dispose()
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -3878,7 +3878,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE"
|
MensajeError = "Error al cancelar IE"
|
||||||
End If
|
End If
|
||||||
@@ -3909,7 +3909,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE"
|
MensajeError = "Error al cancelar IE"
|
||||||
End If
|
End If
|
||||||
@@ -3932,13 +3932,13 @@ Partial Class Bancos_IE
|
|||||||
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
|
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
|
||||||
If TxtFechaDocumento.Text.ToDate < TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then
|
If TxtFechaDocumento.Text.ToDate < TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then
|
||||||
'CANCELA IE MES ANTERIOR
|
'CANCELA IE MES ANTERIOR
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'CANCELA IE MES ACTUAL
|
'CANCELA IE MES ACTUAL
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||||
End If
|
End If
|
||||||
@@ -4107,7 +4107,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'genera nuevo IE contrario
|
'genera nuevo IE contrario
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4123,7 +4123,7 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'siempre se hace una cancelación
|
'siempre se hace una cancelación
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1582,7 +1582,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'Cuando salio NO exitoso cancelamos el IE
|
'Cuando salio NO exitoso cancelamos el IE
|
||||||
If Not ObjIE.CancelarBancos_IE(UsuarioActual.CveUsuario, ArrayCveIEs(index).ToEntero, False, -1) Then
|
If Not ObjIE.CancelarBancos_IE(UsuarioActual.CveUsuario, ArrayCveIEs(index).ToEntero, False, -1, -1) Then
|
||||||
ErrorDB = True
|
ErrorDB = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -131,6 +131,14 @@
|
|||||||
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<label class="col-md-1 truncate">Contabilizable:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<asp:DropDownList ID="DdlOpcionContabilizable" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Contabilizable" Value="0"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="No contabilizable" Value="1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ Partial Class Compras_ProveedoresAuxiliar
|
|||||||
|
|
||||||
'Falta PA
|
'Falta PA
|
||||||
If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa,
|
If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa,
|
||||||
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero) Then
|
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, DdlOpcionContabilizable.SelectedValue.ToEntero) Then
|
||||||
If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
||||||
GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ")
|
GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ")
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1702,7 +1702,9 @@ Partial Class RegPoliza
|
|||||||
|
|
||||||
If ObjConta.RemovePoliza(IDPoliza) Then
|
If ObjConta.RemovePoliza(IDPoliza) Then
|
||||||
If ObjMov.DesvincularPrePolizaContabilizada(IDPoliza, UsuarioActual.CveEmpresa) Then
|
If ObjMov.DesvincularPrePolizaContabilizada(IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Polizas", TxtNumeroPoliza.Text, DdlTipoPoliza.SelectedValue.ToEntero) Then
|
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Polizas", TxtNumeroPoliza.Text, DdlTipoPoliza.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
|
Else
|
||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1341,11 +1341,30 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
|
|
||||||
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||||
Dim ObjContabilidad As New ClsContabilidad
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
ObjContabilidad.IniciaTransacSQL()
|
||||||
|
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
ObjConta.IniciaTransacSQL()
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
If ObjContabilidad.RemovePrePolizas(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
If ObjContabilidad.RemovePrePolizas(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
If IdPoliza > 0 Then
|
||||||
|
If Not ObjConta.RemovePoliza(IdPoliza) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Alert("La Prepóliza ha sido eliminada", TipoMensaje.MsgInformacion)
|
Alert("La Prepóliza ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Alert("La Prepóliza ha podido ser eliminada", TipoMensaje.MsgError)
|
Alert("La Prepóliza ha podido ser eliminada", TipoMensaje.MsgError)
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
ObjContabilidad.Commit()
|
||||||
|
ObjConta.Commit()
|
||||||
|
Else
|
||||||
|
ObjContabilidad.RollBack()
|
||||||
|
ObjConta.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContabilidad.Dispose()
|
ObjContabilidad.Dispose()
|
||||||
|
|||||||
@@ -816,8 +816,15 @@
|
|||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!RFC.Value</Value>
|
<Value>GOTE811117236</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -832,7 +839,7 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||||
<Left>1.78362in</Left>
|
<Left>1.78362in</Left>
|
||||||
<Height>0.46414in</Height>
|
<Height>0.56136in</Height>
|
||||||
<Width>3.96172in</Width>
|
<Width>3.96172in</Width>
|
||||||
<ZIndex>5</ZIndex>
|
<ZIndex>5</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
@@ -1121,7 +1128,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!DomicilioExpedicion.Value</Value>
|
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>7.5pt</FontSize>
|
<FontSize>7.5pt</FontSize>
|
||||||
@@ -1135,9 +1142,9 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||||
<Top>0.46414in</Top>
|
<Top>0.58914in</Top>
|
||||||
<Left>1.87861in</Left>
|
<Left>1.87861in</Left>
|
||||||
<Height>0.69679in</Height>
|
<Height>0.6374in</Height>
|
||||||
<Width>1.65152in</Width>
|
<Width>1.65152in</Width>
|
||||||
<ZIndex>13</ZIndex>
|
<ZIndex>13</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
@@ -1172,7 +1179,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!DomicilioExpedicion.Value</Value>
|
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>7.5pt</FontSize>
|
<FontSize>7.5pt</FontSize>
|
||||||
@@ -1186,9 +1193,9 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||||
<Top>0.46414in</Top>
|
<Top>0.58914in</Top>
|
||||||
<Left>3.84822in</Left>
|
<Left>3.84822in</Left>
|
||||||
<Height>0.69679in</Height>
|
<Height>0.6374in</Height>
|
||||||
<Width>1.786in</Width>
|
<Width>1.786in</Width>
|
||||||
<ZIndex>14</ZIndex>
|
<ZIndex>14</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
@@ -1219,8 +1226,9 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||||
<Top>1.28209in</Top>
|
<Top>1.28209in</Top>
|
||||||
|
<Left>0.13897cm</Left>
|
||||||
<Height>0.23611in</Height>
|
<Height>0.23611in</Height>
|
||||||
<Width>0.89901in</Width>
|
<Width>0.85202in</Width>
|
||||||
<ZIndex>15</ZIndex>
|
<ZIndex>15</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -1294,7 +1302,6 @@
|
|||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Dirección</Value>
|
<Value>Dirección</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -1304,7 +1311,7 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||||
<Top>1.53208in</Top>
|
<Top>1.53208in</Top>
|
||||||
<Left>0.04514in</Left>
|
<Left>0.05471in</Left>
|
||||||
<Height>0.23611in</Height>
|
<Height>0.23611in</Height>
|
||||||
<Width>0.85387in</Width>
|
<Width>0.85387in</Width>
|
||||||
<ZIndex>17</ZIndex>
|
<ZIndex>17</ZIndex>
|
||||||
@@ -1379,9 +1386,8 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Cuidad</Value>
|
<Value>Ciudad</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -1391,7 +1397,7 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||||
<Top>1.7682in</Top>
|
<Top>1.7682in</Top>
|
||||||
<Left>0.04514in</Left>
|
<Left>0.05471in</Left>
|
||||||
<Height>0.25in</Height>
|
<Height>0.25in</Height>
|
||||||
<Width>0.85387in</Width>
|
<Width>0.85387in</Width>
|
||||||
<ZIndex>19</ZIndex>
|
<ZIndex>19</ZIndex>
|
||||||
|
|||||||
@@ -3375,7 +3375,15 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
<Value>CONVENIO CIE Bancomer: 001598120 Referencia:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
|
<FontSize>9.64pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!ClienteCodigo.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
<FontSize>9.64pt</FontSize>
|
<FontSize>9.64pt</FontSize>
|
||||||
@@ -3388,15 +3396,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Referencia: </Value>
|
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
||||||
<Style>
|
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
|
||||||
<FontSize>9.64pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Parameters!Referencia.Value</Value>
|
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
<FontSize>9.64pt</FontSize>
|
<FontSize>9.64pt</FontSize>
|
||||||
@@ -3411,7 +3411,7 @@
|
|||||||
<Top>6.7921in</Top>
|
<Top>6.7921in</Top>
|
||||||
<Left>0.16632cm</Left>
|
<Left>0.16632cm</Left>
|
||||||
<Height>0.36385in</Height>
|
<Height>0.36385in</Height>
|
||||||
<Width>4.87092in</Width>
|
<Width>4.94037in</Width>
|
||||||
<ZIndex>14</ZIndex>
|
<ZIndex>14</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
438
GPS/Rastreo.aspx
438
GPS/Rastreo.aspx
@@ -255,7 +255,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="conditional">
|
<asp:UpdatePanel runat="server" UpdateMode="conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:LinkButton ID="LnkDibujo" OnClientClick="PreparaDibujado();" CommandArgument="KM" Text="<i class='fa fa-pencil-square-o'></i><span>Dibujar GeoReferencia</span>" runat="server">
|
<asp:LinkButton ID="LnkDibujo" OnClientClick="PreparaDibujado();" CommandArgument="KM" Text="<i class='fa fa-pencil-square-o'></i><span>Dibujar GeoReferencia/Punto de Interés</span>" runat="server">
|
||||||
</asp:LinkButton>
|
</asp:LinkButton>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -274,6 +274,7 @@
|
|||||||
<asp:HiddenField ID="GeoRutaHistorico" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="GeoRutaHistorico" runat="server" ClientIDMode="Static" />
|
||||||
<asp:HiddenField ID="HdnOpcion" ClientIDMode="static" runat="server" />
|
<asp:HiddenField ID="HdnOpcion" ClientIDMode="static" runat="server" />
|
||||||
<asp:HiddenField ID="HdnDirecciones" ClientIDMode="static" runat="server" />
|
<asp:HiddenField ID="HdnDirecciones" ClientIDMode="static" runat="server" />
|
||||||
|
<asp:HiddenField ID="HdnGrupo" runat="server" Value="-1" ClientIDMode="Static" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpDatosMapa" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatosMapa" runat="server" UpdateMode="Conditional">
|
||||||
@@ -404,7 +405,7 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<label>Trazar Geocercas: </label>
|
<label>Trazar Geocercas: </label>
|
||||||
<br />
|
<br />
|
||||||
<asp:CheckBox ID="ChkTrazarGeocercas" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
|
<asp:CheckBox ID="ChkTrazarGeocercas" AutoPostBack="true" OnCheckedChanged="ChkTrazarGeocercas_CheckedChanged" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" runat="server" visible="False" id="dvTrazoRutas">
|
<div class="col-md-3" runat="server" visible="False" id="dvTrazoRutas">
|
||||||
@@ -414,7 +415,14 @@
|
|||||||
<asp:CheckBox ID="ChkTrazarGeorutas" AutoPostBack="true" Text=" " runat="server" CssClass="chksino" Width="250px" OnCheckedChanged="ChkTrazarGeorutas_CheckedChanged"></asp:CheckBox>
|
<asp:CheckBox ID="ChkTrazarGeorutas" AutoPostBack="true" Text=" " runat="server" CssClass="chksino" Width="250px" OnCheckedChanged="ChkTrazarGeorutas_CheckedChanged"></asp:CheckBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-3" runat="server" visible="False" id="dvTrazoPI">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label>Trazar P. de Interés: </label>
|
||||||
|
<br />
|
||||||
|
<asp:CheckBox ID="ChkTrazarPuntosInteres" AutoPostBack="true" Text=" " runat="server" CssClass="chksino" Width="250px" OnCheckedChanged="ChkTrazarPI_CheckedChanged"></asp:CheckBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -819,6 +827,49 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivGeoCercas" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpGeoCercas" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="H3" runat="server">Trazar GeoCercas</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<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="TxtBusquedaGeo" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaGeo','{0}')", GvGeoCercas.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvGeorutas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:GridView ID="GvGeoCercas" runat="server" GridLines="None" data-height="200" DataKeyNames="Coordenadas,GeoReferencia,Color" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%" ItemStyle-CssClass="NoClick">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickGeo" />
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="ChkGeo" CssClass="ChkAllEvtGeo" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField DataField="GeoReferencia" ItemStyle-Width="20%" HeaderText="Geocerca" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:TemplateField HeaderText="Color" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgColor" HeaderText="Color" runat="server" Style="height: 20px;" Enabled="false" CausesValidation="False" CssClass="btn btn-circle btn-sm green" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button data-dismiss="modal" class="btn btn-default">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="DivGeoRutas" class="modal ADS fade" role="dialog">
|
<div id="DivGeoRutas" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<asp:UpdatePanel ID="UpGeorutas" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGeorutas" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
@@ -836,14 +887,16 @@
|
|||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvGeorutas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvGeorutas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GvGeorutas" runat="server" GridLines="None" data-height="200" DataKeyNames="Coordenadas,CveGeoReferencia,GeoReferencia, CveDispositivo,Tipo,Color,Estatus,FechaInicio,FechaFin,AplicaLunes,AplicaMartes,AplicaMiercoles,AplicaJueves,AplicaViernes,AplicaSabado,AplicaDomingo, HoraInicio, HoraFin, Tolerancia" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
<asp:GridView ID="GvGeorutas" runat="server" GridLines="None" data-height="200" DataKeyNames="Coordenadas,GeoReferencia,Color" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%" ItemStyle-CssClass="NoClick">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickRuta" />
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox runat="server" ID="ChkRutas" />
|
<asp:CheckBox runat="server" ID="ChkRutas" CssClass="ChkAllEvtRuta" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Tipo" ItemStyle-Width="20%" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="GeoReferencia" ItemStyle-Width="20%" HeaderText="GeoReferencia" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="GeoReferencia" ItemStyle-Width="20%" HeaderText="GeoReferencia" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField HeaderText="Color" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Color" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -860,6 +913,87 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivMostrarPI" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpMostarPI" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="H2" runat="server">Trazar Puntos de Interés</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<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="TxtBusquedaPI" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPI','{0}')", GvGeorutas.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvGeorutas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:GridView ID="GVPuntosInteres" runat="server" GridLines="None" DataKeyNames="Punto,PuntoDeInteres" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-height="150" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%" ItemStyle-CssClass="NoClick">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickPI" />
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="ChkPI" CssClass="ChkAllEvtPI" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField DataField="PuntoDeInteres" ItemStyle-Width="30%" HeaderText="PuntoDeInteres" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Descripcion" ItemStyle-Width="30%" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button data-dismiss="modal" class="btn btn-default">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="DivAgregarPuntoInteres" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpAgregarPuntoInteres" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title">Agregar Punto(s) de interés</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtNombrePI" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVNombrePI" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtNombrePI" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPuntoInteres"></asp:RequiredFieldValidator>
|
||||||
|
<label id="lblPuntos" for="<%= TxtNombrePI.ClientID.ToString()%>">Nombre Punto De Interés:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" style="width: 80%; margin-bottom: 20px;">
|
||||||
|
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPuntoInteres"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||||
|
</div>
|
||||||
|
<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="TxtGVGrupo" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtGVGrupo','{0}')", GvGrupos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtGVGrupo','{0}')", GvGrupos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:GridView ID="GvGrupos" runat="server" GridLines="None" DataKeyNames="CvePuntoDeInteresGrupo,PuntoDeInteresGrupo,Descripcion" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-height="150" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="PuntoDeInteresGrupo" ItemStyle-Width="45%" HeaderText="Agregar a Grupo" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Descripcion" ItemStyle-Width="45%" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="BtnAgregarPunto" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpPuntoInteres"> <i class='material-icons'>done_all</i> Agregar</asp:LinkButton>
|
||||||
|
<button class="btn btn-default" data-dismiss="modal" value="Cancelar">Cancelar </button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div runat="server" class="row" style="margin: 0px 0px 10px 0px; display: none">
|
<div runat="server" class="row" style="margin: 0px 0px 10px 0px; display: none">
|
||||||
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="btnImprimir" CommandArgument="PDF" ToolTip="Imprimir en PDF" CssClass="btn btn-circle mysmallbtn grey" Text="<i class='fa fa-print' aria-hidden='true'></i>"></asp:Button>
|
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="btnImprimir" CommandArgument="PDF" ToolTip="Imprimir en PDF" CssClass="btn btn-circle mysmallbtn grey" Text="<i class='fa fa-print' aria-hidden='true'></i>"></asp:Button>
|
||||||
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="BtnImprimirEX" CommandArgument="EXCEL" ToolTip="Imprimir en EXCEL" CssClass="btn btn-circle btn-xs mysmallbtn green" Text="<i class='fa fa-file-excel-o' aria-hidden='true'></i>"></asp:Button>
|
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="BtnImprimirEX" CommandArgument="EXCEL" ToolTip="Imprimir en EXCEL" CssClass="btn btn-circle btn-xs mysmallbtn green" Text="<i class='fa fa-file-excel-o' aria-hidden='true'></i>"></asp:Button>
|
||||||
@@ -906,6 +1040,11 @@
|
|||||||
var retorno;
|
var retorno;
|
||||||
$('body').on('click', '.ChkAllClick input', function () { $(".ChkAllEvt input").not(this).prop('checked', $('.ChkAllClick input').is(':checked')); });
|
$('body').on('click', '.ChkAllClick input', function () { $(".ChkAllEvt input").not(this).prop('checked', $('.ChkAllClick input').is(':checked')); });
|
||||||
$('body').on('click', '.ChkAllClick2 input', function () { $(".ChkAllEvt input").not(this).prop('checked', $('.ChkAllClick2 input').is(':checked')); });
|
$('body').on('click', '.ChkAllClick2 input', function () { $(".ChkAllEvt input").not(this).prop('checked', $('.ChkAllClick2 input').is(':checked')); });
|
||||||
|
|
||||||
|
$('body').on('click', '.ChkAllClickGeo input', function () { $(".ChkAllEvtGeo input").not(this).prop('checked', $('.ChkAllClickGeo input').is(':checked')); });
|
||||||
|
$('body').on('click', '.ChkAllClickRuta input', function () { $(".ChkAllEvtRuta input").not(this).prop('checked', $('.ChkAllClickRuta input').is(':checked')); });
|
||||||
|
$('body').on('click', '.ChkAllClickPI input', function () { $(".ChkAllEvtPI input").not(this).prop('checked', $('.ChkAllClickPI input').is(':checked')); });
|
||||||
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
map = new google.maps.Map(document.getElementById('map'), {
|
map = new google.maps.Map(document.getElementById('map'), {
|
||||||
center: { lat: 24.6345, lng: -102.5528 },
|
center: { lat: 24.6345, lng: -102.5528 },
|
||||||
@@ -915,23 +1054,20 @@
|
|||||||
var ShowDiv1 = document.createElement('div');
|
var ShowDiv1 = document.createElement('div');
|
||||||
var ShowDivControl = new ShowDiv(ShowDiv1, map);
|
var ShowDivControl = new ShowDiv(ShowDiv1, map);
|
||||||
|
|
||||||
|
|
||||||
ShowDiv1.index = 1;
|
ShowDiv1.index = 1;
|
||||||
ShowDiv1.id = "showdiv1"
|
ShowDiv1.id = "showdiv1"
|
||||||
|
|
||||||
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(ShowDiv1);
|
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(ShowDiv1);
|
||||||
|
|
||||||
|
|
||||||
var upControlDiv = document.createElement('div');
|
var upControlDiv = document.createElement('div');
|
||||||
var upControl = new ControlLabels(upControlDiv, map);
|
var upControl = new ControlLabels(upControlDiv, map);
|
||||||
|
|
||||||
upControlDiv.index = 1;
|
upControlDiv.index = 1;
|
||||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upControlDiv);
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upControlDiv);
|
||||||
|
|
||||||
var upGeoDiv = document.createElement('div');
|
initGeocercas();
|
||||||
var upGeo = new ControlGeocercas(upGeoDiv, map);
|
initGeoRutas();
|
||||||
|
initPI();
|
||||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upGeoDiv);
|
|
||||||
|
|
||||||
geocoder = new google.maps.Geocoder();
|
geocoder = new google.maps.Geocoder();
|
||||||
|
|
||||||
@@ -2135,6 +2271,7 @@
|
|||||||
SelectControlDiv.index = 1;
|
SelectControlDiv.index = 1;
|
||||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(SelectControlDiv);
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(SelectControlDiv);
|
||||||
map.addListener('click', addLatLng);
|
map.addListener('click', addLatLng);
|
||||||
|
CambiaTipo("Geocerca");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($("#DvGuardar").length <= 0) {
|
if ($("#DvGuardar").length <= 0) {
|
||||||
@@ -2147,6 +2284,16 @@
|
|||||||
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(routeControlDiv);
|
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(routeControlDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($("#DvGuardarPI").length <= 0) {
|
||||||
|
var routeControlDiv = document.createElement('div');
|
||||||
|
var routeControl = new ControlGuardarPuntoInteres(routeControlDiv, map);
|
||||||
|
routeControlDiv.id = "DvGuardarPI"
|
||||||
|
if (typeof (index) !== 'undefined') {
|
||||||
|
routeControlDiv.index = index + 1;
|
||||||
|
}
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(routeControlDiv);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
function PreparaDibujadoHistorico() {
|
function PreparaDibujadoHistorico() {
|
||||||
if ($("#DvGuardarHistorico").length <= 0) {
|
if ($("#DvGuardarHistorico").length <= 0) {
|
||||||
@@ -2216,7 +2363,7 @@
|
|||||||
controlUI.style.cursor = 'pointer';
|
controlUI.style.cursor = 'pointer';
|
||||||
// controlUI.style.position = 'absolute';
|
// controlUI.style.position = 'absolute';
|
||||||
controlUI.style.left = "0px";
|
controlUI.style.left = "0px";
|
||||||
controlUI.style.width = "150px";
|
controlUI.style.width = "400px";
|
||||||
controlUI.style.marginTop = "10px"
|
controlUI.style.marginTop = "10px"
|
||||||
controlUI.style.top = "0px";
|
controlUI.style.top = "0px";
|
||||||
controlUI.className = 'gmnoprint';
|
controlUI.className = 'gmnoprint';
|
||||||
@@ -2244,7 +2391,7 @@
|
|||||||
ControlSub2.style.minWidth = '28px'
|
ControlSub2.style.minWidth = '28px'
|
||||||
ControlSub2.style.fontWeight = '500'
|
ControlSub2.style.fontWeight = '500'
|
||||||
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
||||||
ControlSub2.innerHTML = 'Geocerca'
|
ControlSub2.innerHTML = 'Dibujar Geocerca'
|
||||||
ControlSub1.appendChild(ControlSub2)
|
ControlSub1.appendChild(ControlSub2)
|
||||||
|
|
||||||
var ControlSub3 = document.createElement('div')
|
var ControlSub3 = document.createElement('div')
|
||||||
@@ -2269,11 +2416,39 @@
|
|||||||
ControlSub4.style.fontWeight = '500'
|
ControlSub4.style.fontWeight = '500'
|
||||||
ControlSub4.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
ControlSub4.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
||||||
ControlSub4.style.borderLeft = '0px;'
|
ControlSub4.style.borderLeft = '0px;'
|
||||||
ControlSub4.innerHTML = 'Georuta'
|
ControlSub4.innerHTML = 'Dibujar Georuta'
|
||||||
ControlSub3.appendChild(ControlSub4)
|
ControlSub3.appendChild(ControlSub4)
|
||||||
|
|
||||||
|
var ControlSub5 = document.createElement('div')
|
||||||
|
ControlSub5.style.float = 'left';
|
||||||
|
ControlSub5.className = 'gm-style-mtc'
|
||||||
|
controlUI.appendChild(ControlSub5)
|
||||||
|
|
||||||
|
var ControlSub6 = document.createElement('div')
|
||||||
|
ControlSub6.style.direction = 'ltr';
|
||||||
|
ControlSub6.style.overflow = 'hidden';
|
||||||
|
ControlSub6.style.textAlign = 'center';
|
||||||
|
ControlSub6.id = "PuntoInteres"
|
||||||
|
ControlSub6.style.position = 'relative';
|
||||||
|
ControlSub6.style.color = 'rgb(86,86,86)';
|
||||||
|
ControlSub6.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||||
|
ControlSub6.style.msUserSelect = 'none;';
|
||||||
|
ControlSub6.style.fontSize = '11px'
|
||||||
|
ControlSub6.style.backgroundColor = 'rgb(255,255,255)'
|
||||||
|
ControlSub6.style.padding = '11px'
|
||||||
|
ControlSub6.style.backgroundClip = 'padding-box'
|
||||||
|
ControlSub6.style.minWidth = '38px'
|
||||||
|
ControlSub6.style.fontWeight = '500'
|
||||||
|
ControlSub6.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
||||||
|
ControlSub6.style.borderLeft = '0px;'
|
||||||
|
ControlSub6.innerHTML = 'Dibujar Punto de Interés'
|
||||||
|
ControlSub5.appendChild(ControlSub6)
|
||||||
|
|
||||||
// Setup the click event listeners: simply set the map to Chicago.
|
// Setup the click event listeners: simply set the map to Chicago.
|
||||||
|
ControlSub5.addEventListener('click', function () {
|
||||||
|
CambiaTipo('PuntoInteres');
|
||||||
|
});
|
||||||
|
|
||||||
ControlSub3.addEventListener('click', function () {
|
ControlSub3.addEventListener('click', function () {
|
||||||
CambiaTipo('Georuta');
|
CambiaTipo('Georuta');
|
||||||
});
|
});
|
||||||
@@ -2371,6 +2546,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CargaVehiculosHistoricos() {
|
function CargaVehiculosHistoricos() {
|
||||||
var data = [];
|
var data = [];
|
||||||
for (var i = 0; i < geoRutasHistoricas.length; i++) {
|
for (var i = 0; i < geoRutasHistoricas.length; i++) {
|
||||||
@@ -2444,22 +2620,96 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ControlGuardarPuntoInteres(controlDiv, map) {
|
||||||
|
// Set CSS for the control border.
|
||||||
|
var controlUI = document.createElement('div');
|
||||||
|
controlUI.id = "btnGuardarPuntoInteres"
|
||||||
|
controlUI.style.display = 'none';
|
||||||
|
controlUI.style.backgroundColor = '#4B77BE';
|
||||||
|
controlUI.style.color = "#fff";
|
||||||
|
controlUI.style.borderRadius = '3px';
|
||||||
|
controlUI.style.width = '165px'
|
||||||
|
controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)';
|
||||||
|
controlUI.style.cursor = 'pointer';
|
||||||
|
controlUI.style.marginRight = '5px';
|
||||||
|
controlUI.style.marginTop = '5px';
|
||||||
|
controlUI.style.marginBottom = '22px';
|
||||||
|
controlUI.style.textAlign = 'center';
|
||||||
|
controlUI.title = 'Guardar el punto de interés';
|
||||||
|
controlDiv.appendChild(controlUI);
|
||||||
|
|
||||||
|
// Set CSS for the control interior.
|
||||||
|
var controlText = document.createElement('div');
|
||||||
|
controlText.style.color = '#fff';
|
||||||
|
controlText.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||||
|
controlText.style.fontSize = '14px';
|
||||||
|
controlText.style.lineHeight = '38px';
|
||||||
|
controlText.style.paddingLeft = '5px';
|
||||||
|
controlText.style.paddingRight = '5px';
|
||||||
|
controlText.innerHTML = 'Guardar Punto de Interés';
|
||||||
|
controlUI.appendChild(controlText);
|
||||||
|
|
||||||
|
// Setup the click event listeners: simply set the map to Chicago.
|
||||||
|
controlUI.addEventListener('click', function () {
|
||||||
|
|
||||||
|
$("#C_TxtNombrePI").val("")
|
||||||
|
$("#C_TxtDescripcion").val("")
|
||||||
|
$("#HdnGrupo").val("-1");
|
||||||
|
$("#GeoCerca").val("");
|
||||||
|
|
||||||
|
if (markersg.length > 0) {
|
||||||
|
var punto = "(" + markersg[0].position.lng() + ' ' + markersg[0].position.lat() + ")";
|
||||||
|
$("#GeoCerca").val(punto);
|
||||||
|
$("#DivAgregarPuntoInteres").modal({ backdrop: 'static', keyboard: false });
|
||||||
|
} else {
|
||||||
|
alert("No hay puntos de interés en el mapa");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
var indiceAnteriorPI = 0;
|
||||||
|
function CargaDatosSeleccionadosPI(indice, valor) {
|
||||||
|
var columnaSeleccionada = 2 + indice;
|
||||||
|
$('#HdnGrupo').val(valor);
|
||||||
|
$('#C_GvGrupos tr').filter(':nth-child(' + indiceAnterior + ')').css('background-color', 'initial');
|
||||||
|
$('#C_GvGrupos tr').filter(':nth-child(' + columnaSeleccionada + ')').css('background-color', '#F5B27A');
|
||||||
|
indiceAnteriorPI = columnaSeleccionada;
|
||||||
|
}
|
||||||
function CambiaTipo(Tipo) {
|
function CambiaTipo(Tipo) {
|
||||||
DeleteMarkersG();
|
DeleteMarkersG();
|
||||||
if (Tipo === 'Geocerca') {
|
if (Tipo === 'Geocerca') {
|
||||||
$("#HdnTipo").val('Geocerca')
|
$("#HdnTipo").val('Geocerca')
|
||||||
$("#Geocerca").css("font-weight", "bold")
|
SelectBoton("Geocerca");
|
||||||
$("#Georuta").css("font-weight", "normal")
|
DeselectBoton("Georuta");
|
||||||
|
DeselectBoton("PuntoInteres");
|
||||||
} else if (Tipo === 'Georuta') {
|
} else if (Tipo === 'Georuta') {
|
||||||
$("#HdnTipo").val('Georuta')
|
$("#HdnTipo").val('Georuta')
|
||||||
$("#Geocerca").css("font-weight", "normal")
|
SelectBoton("Georuta");
|
||||||
$("#Georuta").css("font-weight", "bold")
|
DeselectBoton("Geocerca");
|
||||||
|
DeselectBoton("PuntoInteres");
|
||||||
|
} else if (Tipo === 'PuntoInteres') {
|
||||||
|
$("#HdnTipo").val('PuntoInteres')
|
||||||
|
SelectBoton("PuntoInteres");
|
||||||
|
DeselectBoton("Geocerca");
|
||||||
|
DeselectBoton("Georuta");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function SelectBoton(boton) {
|
||||||
|
$("#" + boton).css("background-color", "#3598DC");
|
||||||
|
$("#" + boton).css("color", "white");
|
||||||
|
}
|
||||||
|
function DeselectBoton(boton) {
|
||||||
|
$("#" + boton).css("background-color", "rgb(255, 255, 255)");
|
||||||
|
$("#" + boton).css("color", "black");
|
||||||
|
}
|
||||||
|
|
||||||
function addLatLng(event) {
|
function addLatLng(event) {
|
||||||
// var path = poly.getPath();
|
//SOLO SE PUEDE AGREGAR UN PUNTO DE INTERES A LA VEZ
|
||||||
// path.push(event.latLng);
|
if (markersg.length >= 1 && $("#HdnTipo").val() === 'PuntoInteres') {
|
||||||
|
$("#btnGuardarPuntoInteres").css("display", "")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var lat = event.latLng.lat();
|
var lat = event.latLng.lat();
|
||||||
var lng = event.latLng.lng();
|
var lng = event.latLng.lng();
|
||||||
mcoords.push(event.latLng)
|
mcoords.push(event.latLng)
|
||||||
@@ -2477,6 +2727,7 @@
|
|||||||
marker.addListener('click', function () {
|
marker.addListener('click', function () {
|
||||||
info.open(map, marker);
|
info.open(map, marker);
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($("#HdnTipo").val() === 'Georuta') {
|
if ($("#HdnTipo").val() === 'Georuta') {
|
||||||
if (markersg.length > 1) {
|
if (markersg.length > 1) {
|
||||||
CreaRuta();
|
CreaRuta();
|
||||||
@@ -2496,6 +2747,10 @@
|
|||||||
var path = polygon.getPath();
|
var path = polygon.getPath();
|
||||||
path.push(event.latLng)
|
path.push(event.latLng)
|
||||||
}
|
}
|
||||||
|
} else if ($("#HdnTipo").val() === 'PuntoInteres') {
|
||||||
|
if (markersg.length > 0) {
|
||||||
|
$("#btnGuardarPuntoInteres").css("display", "")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2558,12 +2813,12 @@
|
|||||||
markersg[markersg.length - 1].setMap(null)
|
markersg[markersg.length - 1].setMap(null)
|
||||||
markersg.splice((markersg.length - 1), 1);
|
markersg.splice((markersg.length - 1), 1);
|
||||||
mcoords.splice((mcoords.length - 1), 1);
|
mcoords.splice((mcoords.length - 1), 1);
|
||||||
|
|
||||||
if ($("#HdnTipo").val() === 'Georuta') {
|
if ($("#HdnTipo").val() === 'Georuta') {
|
||||||
if (markersg.length >= 2) {
|
if (markersg.length >= 2) {
|
||||||
CreaRuta();
|
CreaRuta();
|
||||||
} else { directionsDisplay.setMap(null); $("#btnGuardarRuta").css("display", "none"); }
|
} else { directionsDisplay.setMap(null); $("#btnGuardarRuta").css("display", "none"); }
|
||||||
}
|
} else if ($("#HdnTipo").val() === 'Geocerca') {
|
||||||
else if ($("#HdnTipo").val() === 'Geocerca') {
|
|
||||||
if (typeof polygon != 'undefined') {
|
if (typeof polygon != 'undefined') {
|
||||||
polygon.setMap(null);
|
polygon.setMap(null);
|
||||||
if (markersg.length >= 3) {
|
if (markersg.length >= 3) {
|
||||||
@@ -2583,6 +2838,10 @@
|
|||||||
$('#CommandArg').val(lng + " " + lat)
|
$('#CommandArg').val(lng + " " + lat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if ($("#HdnTipo").val() === 'PuntoInteres') {
|
||||||
|
if (markersg.length <= 0) {
|
||||||
|
$("#btnGuardarPuntoInteres").css("display", "none")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2598,7 +2857,8 @@
|
|||||||
if (typeof polygon != 'undefined') {
|
if (typeof polygon != 'undefined') {
|
||||||
polygon.setMap(null);
|
polygon.setMap(null);
|
||||||
}
|
}
|
||||||
$("#btnGuardarRuta").css("display", "none")
|
$("#btnGuardarRuta").css("display", "none");
|
||||||
|
$("#btnGuardarPuntoInteres").css("display", "none");
|
||||||
}
|
}
|
||||||
|
|
||||||
function CambiaColor() {
|
function CambiaColor() {
|
||||||
@@ -2671,53 +2931,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
function ControlGeocercas(controlDiv, map) {
|
|
||||||
|
|
||||||
// Set CSS for the control border.
|
|
||||||
var controlUI = document.createElement('div');
|
|
||||||
controlUI.style.marginLeft = '10px';
|
|
||||||
controlUI.style.zIndex = '0';
|
|
||||||
controlUI.style.cursor = 'pointer';
|
|
||||||
// controlUI.style.position = 'absolute';
|
|
||||||
controlUI.style.left = "0px";
|
|
||||||
controlUI.style.width = "150px";
|
|
||||||
controlUI.style.marginTop = "10px"
|
|
||||||
controlUI.style.top = "0px";
|
|
||||||
controlUI.className = 'gmnoprint';
|
|
||||||
|
|
||||||
controlDiv.appendChild(controlUI);
|
|
||||||
|
|
||||||
var ControlSub1 = document.createElement('div')
|
|
||||||
ControlSub1.style.float = 'left';
|
|
||||||
ControlSub1.className = 'gm-style-mtc'
|
|
||||||
controlUI.appendChild(ControlSub1)
|
|
||||||
|
|
||||||
var ControlSub2 = document.createElement('div')
|
|
||||||
ControlSub2.style.direction = 'ltr';
|
|
||||||
ControlSub2.style.overflow = 'hidden';
|
|
||||||
ControlSub2.id = "LnkMostarGeocercas"
|
|
||||||
ControlSub2.style.textAlign = 'center';
|
|
||||||
ControlSub2.style.position = 'relative';
|
|
||||||
ControlSub2.style.color = 'rgb(0,0,0)';
|
|
||||||
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
|
|
||||||
ControlSub2.style.msUserSelect = 'none;';
|
|
||||||
ControlSub2.style.fontSize = '11px'
|
|
||||||
ControlSub2.style.display = 'none'
|
|
||||||
ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
|
|
||||||
ControlSub2.style.padding = '11px'
|
|
||||||
ControlSub2.style.backgroundClip = 'padding-box'
|
|
||||||
ControlSub2.style.minWidth = '28px'
|
|
||||||
ControlSub2.style.fontWeight = '500'
|
|
||||||
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
|
||||||
ControlSub2.innerHTML = 'Mostrar Geocercas'
|
|
||||||
ControlSub1.appendChild(ControlSub2)
|
|
||||||
|
|
||||||
ControlSub1.addEventListener('click', function () {
|
|
||||||
VerGeocercas();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var visible = false
|
var visible = false
|
||||||
function EscondeLabels() {
|
function EscondeLabels() {
|
||||||
@@ -2749,85 +2962,6 @@
|
|||||||
|
|
||||||
//END REGION
|
//END REGION
|
||||||
|
|
||||||
//REGION GEOCERCAS
|
|
||||||
var polygonsGeocercas = [];
|
|
||||||
var markersGeo = [];
|
|
||||||
|
|
||||||
var IsGeoVisibles = false;
|
|
||||||
|
|
||||||
function VerGeocercas() {
|
|
||||||
if (IsGeoVisibles) {
|
|
||||||
HideGeocercas();
|
|
||||||
IsGeoVisibles = false;
|
|
||||||
} else {
|
|
||||||
CargaGeocercas();
|
|
||||||
IsGeoVisibles = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function CargaGeocercas() {
|
|
||||||
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
|
||||||
polygonsGeocercas[i].setMap(map);
|
|
||||||
}
|
|
||||||
for (var j = 0; j < markersGeo.length; j++) {
|
|
||||||
markersGeo[j].setMap(map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function DeleteGeocercas() {
|
|
||||||
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
|
||||||
polygonsGeocercas[i].setMap(null);
|
|
||||||
}
|
|
||||||
for (var j = 0; j < markersGeo.length; j++) {
|
|
||||||
markersGeo[j].setMap(null);
|
|
||||||
}
|
|
||||||
polygonsGeocercas = [];
|
|
||||||
markersGeo = [];
|
|
||||||
}
|
|
||||||
function HideGeocercas() {
|
|
||||||
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
|
||||||
polygonsGeocercas[i].setMap(null);
|
|
||||||
}
|
|
||||||
for (var j = 0; j < markersGeo.length; j++) {
|
|
||||||
markersGeo[j].setMap(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function creaPoligonoGeocerca(coords, color, Geocerca) {
|
|
||||||
var polygon = new google.maps.Polygon({
|
|
||||||
paths: coords,
|
|
||||||
strokeColor: color,
|
|
||||||
strokeOpacity: 0.8,
|
|
||||||
strokeWeight: 2,
|
|
||||||
fillColor: color,
|
|
||||||
fillOpacity: 0.35
|
|
||||||
});
|
|
||||||
polygonsGeocercas.push(polygon);
|
|
||||||
CreaMarcadorPoligonoGeocerca(coords, Geocerca);
|
|
||||||
}
|
|
||||||
function CreaMarcadorPoligonoGeocerca(coords, GeoCerca) {
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
|
||||||
for (i = 0; i < coords.length; i++) {
|
|
||||||
bounds.extend(coords[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var marker = new google.maps.Marker({
|
|
||||||
position: bounds.getCenter(),
|
|
||||||
title: GeoCerca
|
|
||||||
});
|
|
||||||
|
|
||||||
var infowindow = new google.maps.InfoWindow({
|
|
||||||
content: '<h4><b>' + GeoCerca + '</b></h4>'
|
|
||||||
});
|
|
||||||
|
|
||||||
marker.addListener('click', function () {
|
|
||||||
closeLastOpenedInfoWindow();
|
|
||||||
infowindow.open(map, marker);
|
|
||||||
lastOpenedInfoWindow = infowindow;
|
|
||||||
});
|
|
||||||
|
|
||||||
markersGeo.push(marker);
|
|
||||||
}
|
|
||||||
//END REGION
|
|
||||||
|
|
||||||
//REGION PARADAS
|
//REGION PARADAS
|
||||||
var polygonsParadas = [];
|
var polygonsParadas = [];
|
||||||
var markersParadas = [];
|
var markersParadas = [];
|
||||||
@@ -3002,5 +3136,7 @@
|
|||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||||
<script src="Rastreo/JS/GeoRutas.js"></script>
|
<script src="Rastreo/JS/GeoRutas.js"></script>
|
||||||
|
<script src="Rastreo/JS/PuntosDeInteres.js"></script>
|
||||||
|
<script src="Rastreo/JS/Geocercas.js"></script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ Partial Class GPS_Rastreo
|
|||||||
CargaDispositivos()
|
CargaDispositivos()
|
||||||
CargaEventos()
|
CargaEventos()
|
||||||
CargaGrupos()
|
CargaGrupos()
|
||||||
|
CargaGruposPI()
|
||||||
CreaTmpDTDetalle()
|
CreaTmpDTDetalle()
|
||||||
IndiceGV = 0
|
IndiceGV = 0
|
||||||
End If
|
End If
|
||||||
@@ -144,6 +145,16 @@ Partial Class GPS_Rastreo
|
|||||||
RegistraScript("$('#C_GvDispositivos_chkSelectAll').click(function () { $("".ChkAllEvt input"").not(this).prop('checked',$(this).is(':checked')); });", "1")
|
RegistraScript("$('#C_GvDispositivos_chkSelectAll').click(function () { $("".ChkAllEvt input"").not(this).prop('checked',$(this).is(':checked')); });", "1")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaGruposPI()
|
||||||
|
Dim ObjGPS As New ClsGPS
|
||||||
|
If ObjGPS.PuntoDeInteresGrupoGet(-1, 1) Then
|
||||||
|
GvGrupos.DataSource = ObjGPS.DtResultados
|
||||||
|
End If
|
||||||
|
ObjGPS.Dispose()
|
||||||
|
GvGrupos.DataBind()
|
||||||
|
|
||||||
|
UpAgregarPuntoInteres.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaEventos()
|
Private Sub CargaEventos()
|
||||||
Dim GPS As New ClsGPS
|
Dim GPS As New ClsGPS
|
||||||
@@ -326,40 +337,32 @@ Partial Class GPS_Rastreo
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ElseIf Opcion = "All" Then
|
|
||||||
|
|
||||||
'Dim CveDispositivo = GVRow.DataKey("CveDispositivo").ToEntero
|
|
||||||
'Dim RowDispositivo As DataRow = GlobalDTDispositivos(UsuarioActual.CveCliente).FiltroPrimero($"CveDispositivo = {CveDispositivo}")
|
|
||||||
'Dim json As JObject = GPS.GetPosicionEquipoJson(CveDispositivo, FechaI, FechaF, RowDispositivo("Icono").ToString, RowDispositivo("ColorTrazo").ToString, GVRow.DataKey("NombreVehiculo").ToString, UsuarioActual.TienePermisoProceso(200))
|
|
||||||
'HdnJSScript.Value = json.ToString()
|
|
||||||
'DtPosiciones = GPS.DtPosicionesResultados '.AsEnumerable().Take(1000).CopyToDataTable()
|
|
||||||
'UpDatosMapa.Update()
|
|
||||||
|
|
||||||
'RegistraScript($"CargaHistorico(); PreparaDibujadoHistorico();PreparaDibujado(3);")
|
|
||||||
|
|
||||||
|
|
||||||
If ChkTrazarGeocercas.Checked Then
|
If ChkTrazarGeocercas.Checked Then
|
||||||
Dim DtGeocercas As DataTable = Nothing
|
MostrarGeoCercas()
|
||||||
|
|
||||||
If GPS.GetReferenciaDetalle(-1, -1, GVRow.DataKey("CveDispositivo").ToEntero, UsuarioActual.CveCliente) Then
|
|
||||||
DtGeocercas = GPS.DtResultados.FiltraParametros("EsParada = False And Tipo='Geocerca' AND Estatus = 1")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
If ChkTrazarGeorutas.Checked Then
|
||||||
If DtGeocercas IsNot Nothing Then
|
MostrarGeoRutas()
|
||||||
Dim SbJS As New StringBuilder
|
|
||||||
SbJS.Append("$('#LnkMostarGeocercas').css('display', 'block'); setTimeout(function(){ ")
|
|
||||||
For Each Dr As DataRow In DtGeocercas.Rows
|
|
||||||
Dim CoordsParada = SQLToGmapsJArray(Dr("Coordenadas").ToString, "POLYGON")
|
|
||||||
SbJS.AppendFormat(" creaPoligonoGeocerca({0},'{1}','{2}'); ", CoordsParada.ToString, Dr("Color").ToString, Dr("GeoReferencia").ToString)
|
|
||||||
Next
|
|
||||||
SbJS.Append(" VerGeocercas(); },1000);")
|
|
||||||
RegistraScript(SbJS.ToString)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
RegistraScript("$('#LnkMostarGeocercas').css('display', 'none');")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ChkTrazarPuntosInteres.Checked Then
|
||||||
|
MostrarPuntosDeInteres()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf Opcion = "All" Then
|
||||||
|
|
||||||
|
If ChkTrazarGeocercas.Checked Then
|
||||||
|
MostrarGeoCercas()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkTrazarGeorutas.Checked Then
|
||||||
|
MostrarGeoRutas()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkTrazarPuntosInteres.Checked Then
|
||||||
|
MostrarPuntosDeInteres()
|
||||||
|
End If
|
||||||
|
|
||||||
If GPS.GetPosicionEquipo(GVRow.DataKey("CveDispositivo").ToEntero, FechaI, FechaF) Then
|
If GPS.GetPosicionEquipo(GVRow.DataKey("CveDispositivo").ToEntero, FechaI, FechaF) Then
|
||||||
If GPS.DtResultados.Rows.Count > 0 Then
|
If GPS.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -573,6 +576,19 @@ Partial Class GPS_Rastreo
|
|||||||
RegistraScript($"CreaMarcador({Coord},'{row("NombreVehiculo")}', '{Info}', '{Icono}');", row("CveDispositivo").ToString)
|
RegistraScript($"CreaMarcador({Coord},'{row("NombreVehiculo")}', '{Info}', '{Icono}');", row("CveDispositivo").ToString)
|
||||||
AddRowPosiciones(Vehiculo, Coord, row("SPD").ToString.ToDouble, Fecha, row("CveDispositivo").ToString.ToEntero, row("TiempoDetenido").ToString.ToDouble)
|
AddRowPosiciones(Vehiculo, Coord, row("SPD").ToString.ToDouble, Fecha, row("CveDispositivo").ToString.ToEntero, row("TiempoDetenido").ToString.ToDouble)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If ChkTrazarGeocercas.Checked Then
|
||||||
|
MostrarGeoCercas()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkTrazarGeorutas.Checked Then
|
||||||
|
MostrarGeoRutas()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkTrazarPuntosInteres.Checked Then
|
||||||
|
MostrarPuntosDeInteres()
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert($"No se encontraron resultados")
|
Alert($"No se encontraron resultados")
|
||||||
End If
|
End If
|
||||||
@@ -619,15 +635,16 @@ Partial Class GPS_Rastreo
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If ChkTrazarGeocercas.Checked Then
|
If ChkTrazarGeocercas.Checked Then
|
||||||
Dim Dispositivos As String = Equipos.Replace(";", ",").Remove(Equipos.Length - 1, 1)
|
MostrarGeoCercas()
|
||||||
CargaGeocercas(Dispositivos)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkTrazarGeorutas.Checked Then
|
If ChkTrazarGeorutas.Checked Then
|
||||||
MostarGeoRutas()
|
MostrarGeoRutas()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript("setTimeout(function(){ $('#LnkMostarGeocercas').css('display', 'block'); },1000);")
|
If ChkTrazarPuntosInteres.Checked Then
|
||||||
|
MostrarPuntosDeInteres()
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Alert($"No se encontraron resultados", TipoMensaje.MsgAdvertencia)
|
Alert($"No se encontraron resultados", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -702,6 +719,7 @@ Partial Class GPS_Rastreo
|
|||||||
GPS.Dispose()
|
GPS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGeocercas(Dispositivos As String)
|
Private Sub CargaGeocercas(Dispositivos As String)
|
||||||
|
Try
|
||||||
Dim DtGeocercas As DataTable = Nothing
|
Dim DtGeocercas As DataTable = Nothing
|
||||||
|
|
||||||
Dim ObjGPSGeo As New ClsGPS
|
Dim ObjGPSGeo As New ClsGPS
|
||||||
@@ -712,19 +730,36 @@ Partial Class GPS_Rastreo
|
|||||||
|
|
||||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
||||||
If DtGeocercas IsNot Nothing Then
|
If DtGeocercas IsNot Nothing Then
|
||||||
Dim DtParadasDispositivo = DtGeocercas.FiltraParametros($"CveDispositivo IN({Dispositivos})", "", {"Color", "GeoReferencia", "Coordenadas"})
|
Dim DtParadasDispositivo = DtGeocercas.FiltraParametros($"CveDispositivo IN({Dispositivos})", DistinctColumns:={"GeoReferencia", "Coordenadas", "Color"})
|
||||||
Dim SbJS As New StringBuilder
|
|
||||||
SbJS.Append("$('#LnkMostarGeocercas').css('display', 'block'); setTimeout(function(){ ")
|
GvGeoCercas.DataSource = DtParadasDispositivo
|
||||||
For Each Dr As DataRow In DtParadasDispositivo.Rows
|
GvGeoCercas.DataBind()
|
||||||
SbJS.AppendFormat(" creaPoligonoGeocerca({0},'{1}','{2}'); ", SQLToGmapsJArray(Dr("Coordenadas").ToString, "POLYGON"), Dr("Color").ToString, Dr("GeoReferencia").ToString)
|
|
||||||
Next
|
|
||||||
SbJS.Append(" VerGeocercas(); },1000);")
|
|
||||||
RegistraScript(SbJS.ToString)
|
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al consultar las geocercas", ex)
|
||||||
|
End Try
|
||||||
|
UpGeoCercas.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub MostarGeoRutas()
|
Private Sub MostrarGeoCercas()
|
||||||
Dim count = 0
|
Dim count = 0
|
||||||
RegistraScript($"initGeoRutas();", count.ToString())
|
Try
|
||||||
|
RegistraScript($"NuevaConsultaGeoCercas();", count.ToString())
|
||||||
|
For Each GvRow As GridViewRow In GvGeoCercas.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
If GvRow.FCCheckBox("ChkGeo").Checked Then
|
||||||
|
count += 1
|
||||||
|
RegistraScript(String.Format("creaPoligonoGeocerca({0},'{1}','{2}'); ", SQLToGmapsJArray(GvRow.DataKey("Coordenadas"), "POLYGON"), GvRow.DataKey("Color"), GvRow.DataKey("GeoReferencia")), count.ToString())
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
RegistraScript("VerGeocercas();", (count + 1).ToString())
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al consultar las geocercas", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Private Sub MostrarGeoRutas()
|
||||||
|
Dim count = 0
|
||||||
|
RegistraScript($"NuevaConsultaGeoRutas();", count.ToString())
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvGeorutas.Rows
|
For Each GvRow As GridViewRow In GvGeorutas.Rows
|
||||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -736,6 +771,20 @@ Partial Class GPS_Rastreo
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MostrarPuntosDeInteres()
|
||||||
|
RegistraScript($"NuevaConsultaPI();", "0")
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GVPuntosInteres.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
If GvRow.FCCheckBox("ChkPI").Checked Then
|
||||||
|
Dim coords = SQLToGmaps(GvRow.DataKey("Punto"), "POINT")
|
||||||
|
RegistraScript($"CreaMarcadorPI({coords}, '{GvRow.DataKey("PuntoDeInteres").ToString}')", GvRow.RowIndex.ToString())
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub TimmerRefresh_Tick(sender As Object, e As EventArgs)
|
Protected Sub TimmerRefresh_Tick(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
@@ -778,7 +827,6 @@ Partial Class GPS_Rastreo
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If chkTrazarLinea.Checked Then
|
If chkTrazarLinea.Checked Then
|
||||||
TrazarLineaContinuo = True
|
TrazarLineaContinuo = True
|
||||||
CreaDTCoordenadas()
|
CreaDTCoordenadas()
|
||||||
@@ -1146,8 +1194,16 @@ Partial Class GPS_Rastreo
|
|||||||
TimmerRefresh.Enabled = False
|
TimmerRefresh.Enabled = False
|
||||||
HdnOpcion.Value = opcion
|
HdnOpcion.Value = opcion
|
||||||
|
|
||||||
chkTrazarLinea.Visible = False
|
dvTrazo.Visible = False
|
||||||
ChkTrazarGeocercas.Visible = False
|
dvTrazoGeo.Visible = False
|
||||||
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
|
|
||||||
|
chkTrazarLinea.Checked = False
|
||||||
|
ChkTrazarGeocercas.Checked = False
|
||||||
|
ChkTrazarGeorutas.Checked = False
|
||||||
|
ChkTrazarPuntosInteres.Checked = False
|
||||||
|
|
||||||
DvPaginacion.Visible = False
|
DvPaginacion.Visible = False
|
||||||
rowImpresionesKM.Visible = False
|
rowImpresionesKM.Visible = False
|
||||||
If opcion = "All" Then
|
If opcion = "All" Then
|
||||||
@@ -1158,6 +1214,7 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = True
|
dvTrazoGeo.Visible = True
|
||||||
dvTrazoRutas.Visible = True
|
dvTrazoRutas.Visible = True
|
||||||
|
dvTrazoPI.Visible = True
|
||||||
ChkTrazarGeocercas.Visible = True
|
ChkTrazarGeocercas.Visible = True
|
||||||
dvMinutos.Visible = False
|
dvMinutos.Visible = False
|
||||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||||
@@ -1172,6 +1229,7 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = False
|
dvTrazoGeo.Visible = False
|
||||||
dvTrazoRutas.Visible = False
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
dvMinutos.Visible = False
|
dvMinutos.Visible = False
|
||||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||||
@@ -1184,6 +1242,7 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = False
|
dvTrazoGeo.Visible = False
|
||||||
dvTrazoRutas.Visible = False
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
dvDispositivos.Visible = True
|
dvDispositivos.Visible = True
|
||||||
dvMinutos.Visible = False
|
dvMinutos.Visible = False
|
||||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1 AND LimiteVelocidad = 1")
|
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1 AND LimiteVelocidad = 1")
|
||||||
@@ -1201,6 +1260,7 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = False
|
dvTrazoGeo.Visible = False
|
||||||
dvTrazoRutas.Visible = False
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
dvMinutos.Visible = True
|
dvMinutos.Visible = True
|
||||||
dvEventos.Visible = False
|
dvEventos.Visible = False
|
||||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||||
@@ -1214,6 +1274,7 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = False
|
dvTrazoGeo.Visible = False
|
||||||
dvTrazoRutas.Visible = False
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
dvMinutos.Visible = False
|
dvMinutos.Visible = False
|
||||||
dvEventos.Visible = False
|
dvEventos.Visible = False
|
||||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||||
@@ -1223,8 +1284,9 @@ Partial Class GPS_Rastreo
|
|||||||
dvFechas.Visible = False
|
dvFechas.Visible = False
|
||||||
dvDispositivos.Visible = True
|
dvDispositivos.Visible = True
|
||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = False
|
dvTrazoGeo.Visible = True
|
||||||
dvTrazoRutas.Visible = False
|
dvTrazoRutas.Visible = True
|
||||||
|
dvTrazoPI.Visible = True
|
||||||
dvMinutos.Visible = False
|
dvMinutos.Visible = False
|
||||||
dvEventos.Visible = False
|
dvEventos.Visible = False
|
||||||
BtnRastrear.ValidationGroup = "xx"
|
BtnRastrear.ValidationGroup = "xx"
|
||||||
@@ -1236,23 +1298,13 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = True
|
dvTrazo.Visible = True
|
||||||
dvTrazoGeo.Visible = True
|
dvTrazoGeo.Visible = True
|
||||||
dvTrazoRutas.Visible = True
|
dvTrazoRutas.Visible = True
|
||||||
|
dvTrazoPI.Visible = True
|
||||||
dvEventos.Visible = False
|
dvEventos.Visible = False
|
||||||
BtnRastrear.ValidationGroup = "xx"
|
BtnRastrear.ValidationGroup = "xx"
|
||||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||||
myModalLabel2.InnerHtml = "Rastreo Continuo"
|
myModalLabel2.InnerHtml = "Rastreo Continuo"
|
||||||
chkTrazarLinea.Visible = True
|
chkTrazarLinea.Visible = True
|
||||||
ChkTrazarGeocercas.Visible = True
|
ChkTrazarGeocercas.Visible = True
|
||||||
ElseIf opcion = "Watch" Then
|
|
||||||
dvFechas.Visible = False
|
|
||||||
dvDispositivos.Visible = True
|
|
||||||
dvMinutos.Visible = False
|
|
||||||
dvTrazo.Visible = True
|
|
||||||
dvTrazoGeo.Visible = True
|
|
||||||
dvTrazoRutas.Visible = True
|
|
||||||
dvEventos.Visible = False
|
|
||||||
BtnRastrear.ValidationGroup = "xx"
|
|
||||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
|
||||||
myModalLabel2.InnerHtml = "Rastreo Continuo"
|
|
||||||
ElseIf opcion = "KM" Then
|
ElseIf opcion = "KM" Then
|
||||||
dvFechas.Visible = True
|
dvFechas.Visible = True
|
||||||
dvDispositivos.Visible = False
|
dvDispositivos.Visible = False
|
||||||
@@ -1260,6 +1312,7 @@ Partial Class GPS_Rastreo
|
|||||||
dvTrazo.Visible = False
|
dvTrazo.Visible = False
|
||||||
dvTrazoGeo.Visible = False
|
dvTrazoGeo.Visible = False
|
||||||
dvTrazoRutas.Visible = False
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
dvEventos.Visible = False
|
dvEventos.Visible = False
|
||||||
BtnRastrear.ValidationGroup = "xx"
|
BtnRastrear.ValidationGroup = "xx"
|
||||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||||
@@ -1268,6 +1321,10 @@ Partial Class GPS_Rastreo
|
|||||||
dvFechas.Visible = False
|
dvFechas.Visible = False
|
||||||
dvDispositivos.Visible = True
|
dvDispositivos.Visible = True
|
||||||
dvMinutos.Visible = False
|
dvMinutos.Visible = False
|
||||||
|
dvTrazo.Visible = False
|
||||||
|
dvTrazoGeo.Visible = False
|
||||||
|
dvTrazoRutas.Visible = False
|
||||||
|
dvTrazoPI.Visible = False
|
||||||
DivFechasGVBarra.Visible = False
|
DivFechasGVBarra.Visible = False
|
||||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("CveModelo = 17")
|
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("CveModelo = 17")
|
||||||
GvDispositivos.DataBind()
|
GvDispositivos.DataBind()
|
||||||
@@ -1276,23 +1333,34 @@ Partial Class GPS_Rastreo
|
|||||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||||
myModalLabel2.InnerHtml = "Contador de pasajeros"
|
myModalLabel2.InnerHtml = "Contador de pasajeros"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not dvTrazoGeo.Visible Then
|
||||||
|
RegistraScript("$('#LnkMostarGeocercas').css('display', 'none');")
|
||||||
|
End If
|
||||||
|
|
||||||
If dvTrazoRutas.Visible Then
|
If dvTrazoRutas.Visible Then
|
||||||
CargaGeoRutas()
|
CargaGeoRutas()
|
||||||
Else
|
Else
|
||||||
RegistraScript("$('#LnkMostarGeoRutas').css('display', 'none');")
|
RegistraScript("$('#LnkMostarGeoRutas').css('display', 'none');")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If dvTrazoPI.Visible Then
|
||||||
|
CargaPI()
|
||||||
|
Else
|
||||||
|
RegistraScript("$('#LnkMostarPI').css('display', 'none');")
|
||||||
|
End If
|
||||||
|
|
||||||
If opcion <> "Speed" AndAlso opcion <> "TPS" AndAlso Filtrado Then
|
If opcion <> "Speed" AndAlso opcion <> "TPS" AndAlso Filtrado Then
|
||||||
CargaDispositivos()
|
CargaDispositivos()
|
||||||
Filtrado = False
|
Filtrado = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript("$(""#h"").modal('hide');
|
RegistraScript("$(""#h"").modal('hide');
|
||||||
$(""#ShowDiv3"").css(""line-height"", ""20px"");
|
$(""#ShowDiv3"").css(""line-height"", ""20px"");
|
||||||
open = false;
|
open = false;
|
||||||
$(""#ShowDiv3"").html('<i class=""fa fa-angle-up"" aria-hidden=""True""></i>');", "HideDiv")
|
$(""#ShowDiv3"").html('<i class=""fa fa-angle-up"" aria-hidden=""True""></i>');", "HideDiv")
|
||||||
RegistraScript("$(""input[name^='ctl00$C$GvDispositivos']"").not(this).prop('checked', false);$('#C_GvDispositivos_chkSelectAll').click(function () { $(""input[name^='ctl00$C$GvDispositivos']"").not(this).prop('checked', this.checked); });", "chkGV")
|
RegistraScript("$(""input[name^='ctl00$C$GvDispositivos']"").not(this).prop('checked', false);$('#C_GvDispositivos_chkSelectAll').click(function () { $(""input[name^='ctl00$C$GvDispositivos']"").not(this).prop('checked', this.checked); });", "chkGV")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UPConsulta.Update()
|
UPConsulta.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2158,12 +2226,39 @@ Partial Class GPS_Rastreo
|
|||||||
End Using
|
End Using
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
#Region "G E O R U T A S"
|
#Region "G E O R E F E R E N C I A S"
|
||||||
|
Protected Sub ChkTrazarGeocercas_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
If ChkTrazarGeocercas.Checked Then
|
||||||
|
Dim CountEquipos As Integer = 0
|
||||||
|
Dim Equipos As New StringBuilder()
|
||||||
|
For Each row As GridViewRow In GvDispositivos.Rows
|
||||||
|
If row.FCCheckBox("chkDis").Checked Then
|
||||||
|
CountEquipos += 1
|
||||||
|
Equipos.Append($"{row.DataKey("CveDispositivo")};")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If CountEquipos > 0 Then
|
||||||
|
Dim Dispositivos As String = Equipos.Replace(";", ",").Remove(Equipos.Length - 1, 1).ToString()
|
||||||
|
CargaGeocercas(Dispositivos)
|
||||||
|
|
||||||
|
RegistraScript("$('#DivGeoCercas').modal('show');")
|
||||||
|
Else
|
||||||
|
Alert("No hay equipos seleccionados", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Sub ChkTrazarGeorutas_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkTrazarGeorutas_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
If ChkTrazarGeorutas.Checked Then
|
If ChkTrazarGeorutas.Checked Then
|
||||||
RegistraScript("$('#DivGeoRutas').modal('show');")
|
RegistraScript("$('#DivGeoRutas').modal('show');")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub ChkTrazarPI_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
If ChkTrazarPuntosInteres.Checked Then
|
||||||
|
RegistraScript("$('#DivMostrarPI').modal('show');")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaGeoRutas()
|
Private Sub CargaGeoRutas()
|
||||||
Dim ObjGPS As New ClsGPS
|
Dim ObjGPS As New ClsGPS
|
||||||
@@ -2175,6 +2270,49 @@ Partial Class GPS_Rastreo
|
|||||||
|
|
||||||
UpGeorutas.Update()
|
UpGeorutas.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaPI()
|
||||||
|
Dim ObjGPS As New ClsGPS
|
||||||
|
If ObjGPS.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then
|
||||||
|
GVPuntosInteres.DataSource = ObjGPS.DtResultados
|
||||||
|
End If
|
||||||
|
ObjGPS.Dispose()
|
||||||
|
GVPuntosInteres.DataBind()
|
||||||
|
|
||||||
|
UpMostarPI.Update()
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub GvGrupos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvGrupos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
e.Row.Attributes.Add("onClick", $"CargaDatosSeleccionadosPI({e.Row.RowIndex}, '{e.Row.DBCampo("CvePuntoDeInteresGrupo").ToString}');")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAgregarPunto_Click(sender As Object, e As EventArgs) Handles BtnAgregarPunto.Click
|
||||||
|
Dim HuboError = False
|
||||||
|
Dim ObjGPS As New ClsGPS
|
||||||
|
ObjGPS.IniciaTransacSQL()
|
||||||
|
Try
|
||||||
|
Dim GEOM As String = $"POINT{GeoCerca.Value}"
|
||||||
|
If Not ObjGPS.PuntoDeInteresAdd(TxtNombrePI.Text, UsuarioActual.CveCliente, GEOM, True, TxtDescripcion.Text, HdnGrupo.Value.ToEntero) Then
|
||||||
|
HuboError = True
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
HuboError = True
|
||||||
|
OnError("Ocurrió un error al agregar el punto de interés", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If HuboError Then
|
||||||
|
ObjGPS.RollBack()
|
||||||
|
Else
|
||||||
|
ObjGPS.Commit()
|
||||||
|
TxtDescripcion.Text = ""
|
||||||
|
TxtNombre.Text = ""
|
||||||
|
Alert("El punto de interés se agregó correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
RegistraScript("$('#DivAgregarPuntoInteres').modal('hide');DeleteMarkersG();", "1")
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpAgregarPuntoInteres.Update()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
139
GPS/Rastreo/JS/Geocercas.js
Normal file
139
GPS/Rastreo/JS/Geocercas.js
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
//REGION GEOCERCAS
|
||||||
|
var polygonsGeocercas = [];
|
||||||
|
var markersGeo = [];
|
||||||
|
var IsGeoVisibles = false;
|
||||||
|
|
||||||
|
|
||||||
|
function initGeocercas() {
|
||||||
|
//NuevaConsultaGeoCercas();
|
||||||
|
var upGeoDiv = document.createElement('div');
|
||||||
|
var upGeo = new ControlGeocercas(upGeoDiv, map);
|
||||||
|
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upGeoDiv);
|
||||||
|
}
|
||||||
|
|
||||||
|
function NuevaConsultaGeoCercas() {
|
||||||
|
HideGeocercas();
|
||||||
|
DeleteGeocercas();
|
||||||
|
|
||||||
|
$("#LnkMostarGeocercas").css("display", "block");
|
||||||
|
}
|
||||||
|
|
||||||
|
function VerGeocercas() {
|
||||||
|
if (IsGeoVisibles) {
|
||||||
|
HideGeocercas();
|
||||||
|
IsGeoVisibles = false;
|
||||||
|
} else {
|
||||||
|
CargaGeocercas();
|
||||||
|
IsGeoVisibles = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function CargaGeocercas() {
|
||||||
|
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
||||||
|
polygonsGeocercas[i].setMap(map);
|
||||||
|
}
|
||||||
|
for (var j = 0; j < markersGeo.length; j++) {
|
||||||
|
markersGeo[j].setMap(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function DeleteGeocercas() {
|
||||||
|
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
||||||
|
polygonsGeocercas[i].setMap(null);
|
||||||
|
}
|
||||||
|
for (var j = 0; j < markersGeo.length; j++) {
|
||||||
|
markersGeo[j].setMap(null);
|
||||||
|
}
|
||||||
|
polygonsGeocercas = [];
|
||||||
|
markersGeo = [];
|
||||||
|
}
|
||||||
|
function HideGeocercas() {
|
||||||
|
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
||||||
|
polygonsGeocercas[i].setMap(null);
|
||||||
|
}
|
||||||
|
for (var j = 0; j < markersGeo.length; j++) {
|
||||||
|
markersGeo[j].setMap(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function creaPoligonoGeocerca(coords, color, Geocerca) {
|
||||||
|
var polygon = new google.maps.Polygon({
|
||||||
|
paths: coords,
|
||||||
|
strokeColor: color,
|
||||||
|
strokeOpacity: 0.8,
|
||||||
|
strokeWeight: 2,
|
||||||
|
fillColor: color,
|
||||||
|
fillOpacity: 0.35
|
||||||
|
});
|
||||||
|
polygonsGeocercas.push(polygon);
|
||||||
|
CreaMarcadorPoligonoGeocerca(coords, Geocerca);
|
||||||
|
}
|
||||||
|
function CreaMarcadorPoligonoGeocerca(coords, GeoCerca) {
|
||||||
|
var bounds = new google.maps.LatLngBounds();
|
||||||
|
for (i = 0; i < coords.length; i++) {
|
||||||
|
bounds.extend(coords[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: bounds.getCenter(),
|
||||||
|
title: GeoCerca
|
||||||
|
});
|
||||||
|
|
||||||
|
var infowindow = new google.maps.InfoWindow({
|
||||||
|
content: '<h4><b>' + GeoCerca + '</b></h4>'
|
||||||
|
});
|
||||||
|
|
||||||
|
marker.addListener('click', function () {
|
||||||
|
closeLastOpenedInfoWindow();
|
||||||
|
infowindow.open(map, marker);
|
||||||
|
lastOpenedInfoWindow = infowindow;
|
||||||
|
});
|
||||||
|
|
||||||
|
markersGeo.push(marker);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ControlGeocercas(controlDiv, map) {
|
||||||
|
|
||||||
|
// Set CSS for the control border.
|
||||||
|
var controlUI = document.createElement('div');
|
||||||
|
controlUI.style.marginLeft = '10px';
|
||||||
|
controlUI.style.zIndex = '0';
|
||||||
|
controlUI.style.cursor = 'pointer';
|
||||||
|
// controlUI.style.position = 'absolute';
|
||||||
|
controlUI.style.left = "0px";
|
||||||
|
controlUI.style.width = "150px";
|
||||||
|
controlUI.style.marginTop = "10px"
|
||||||
|
controlUI.style.top = "0px";
|
||||||
|
controlUI.className = 'gmnoprint';
|
||||||
|
|
||||||
|
controlDiv.appendChild(controlUI);
|
||||||
|
|
||||||
|
var ControlSub1 = document.createElement('div')
|
||||||
|
ControlSub1.style.float = 'left';
|
||||||
|
ControlSub1.className = 'gm-style-mtc'
|
||||||
|
controlUI.appendChild(ControlSub1)
|
||||||
|
|
||||||
|
var ControlSub2 = document.createElement('div')
|
||||||
|
ControlSub2.style.direction = 'ltr';
|
||||||
|
ControlSub2.style.overflow = 'hidden';
|
||||||
|
ControlSub2.id = "LnkMostarGeocercas"
|
||||||
|
ControlSub2.style.textAlign = 'center';
|
||||||
|
ControlSub2.style.position = 'relative';
|
||||||
|
ControlSub2.style.color = 'rgb(0,0,0)';
|
||||||
|
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||||
|
ControlSub2.style.msUserSelect = 'none;';
|
||||||
|
ControlSub2.style.fontSize = '11px'
|
||||||
|
ControlSub2.style.display = 'none'
|
||||||
|
ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
|
||||||
|
ControlSub2.style.padding = '11px'
|
||||||
|
ControlSub2.style.backgroundClip = 'padding-box'
|
||||||
|
ControlSub2.style.minWidth = '28px'
|
||||||
|
ControlSub2.style.fontWeight = '500'
|
||||||
|
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
||||||
|
ControlSub2.innerHTML = 'Mostrar Geocercas'
|
||||||
|
ControlSub1.appendChild(ControlSub2)
|
||||||
|
|
||||||
|
ControlSub1.addEventListener('click', function () {
|
||||||
|
VerGeocercas();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//END REGION
|
||||||
Reference in New Issue
Block a user