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>
|
||||||
|
|||||||
2538
GPS/Rastreo.aspx
2538
GPS/Rastreo.aspx
File diff suppressed because it is too large
Load Diff
@@ -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
|
|
||||||
|
|
||||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
|
||||||
If DtGeocercas IsNot Nothing Then
|
|
||||||
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 ChkTrazarGeorutas.Checked Then
|
||||||
|
MostrarGeoRutas()
|
||||||
|
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,29 +719,47 @@ Partial Class GPS_Rastreo
|
|||||||
GPS.Dispose()
|
GPS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGeocercas(Dispositivos As String)
|
Private Sub CargaGeocercas(Dispositivos As String)
|
||||||
Dim DtGeocercas As DataTable = Nothing
|
Try
|
||||||
|
Dim DtGeocercas As DataTable = Nothing
|
||||||
|
|
||||||
Dim ObjGPSGeo As New ClsGPS
|
Dim ObjGPSGeo As New ClsGPS
|
||||||
If ObjGPSGeo.GetReferenciaDetalle(-1, -1, -1, UsuarioActual.CveCliente) Then
|
If ObjGPSGeo.GetReferenciaDetalle(-1, -1, -1, UsuarioActual.CveCliente) Then
|
||||||
DtGeocercas = ObjGPSGeo.DtResultados.FiltraParametros("EsParada = False AND Tipo='Geocerca' AND Estatus = 1")
|
DtGeocercas = ObjGPSGeo.DtResultados.FiltraParametros("EsParada = False AND Tipo='Geocerca' AND Estatus = 1")
|
||||||
End If
|
End If
|
||||||
ObjGPSGeo.Dispose()
|
ObjGPSGeo.Dispose()
|
||||||
|
|
||||||
'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)
|
End If
|
||||||
Next
|
Catch ex As Exception
|
||||||
SbJS.Append(" VerGeocercas(); },1000);")
|
OnError("Ocurrió un error al consultar las geocercas", ex)
|
||||||
RegistraScript(SbJS.ToString)
|
End Try
|
||||||
End If
|
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