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
|
||||
If e.Row.RowType = DataControlRowType.DataRow 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("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"
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -1597,7 +1597,7 @@ Public Class ClsBancos
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_Banc_IECancelar")
|
||||
@@ -1607,6 +1607,7 @@ Public Class ClsBancos
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@MesAnterior", SqlDbType.Bit).Value = MesAnterior
|
||||
.Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza
|
||||
.Add("@FolioPoliza", SqlDbType.Int).Value = FolioPoliza
|
||||
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
|
||||
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
||||
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,
|
||||
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
|
||||
|
||||
DataAdapter("PA_Conta_ProveedoresAuxiliar")
|
||||
@@ -402,6 +402,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||
.Add("@Contabilizable", SqlDbType.Int).Value = Contabilizable
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1477,7 +1478,7 @@ Public Class ClsContabilidad
|
||||
|
||||
|
||||
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)
|
||||
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
|
||||
Retorno = False
|
||||
|
||||
@@ -128,7 +128,7 @@ Public Class ClsEdocumentacion
|
||||
#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
|
||||
|
||||
DataAdapter("PA_Edoc_DocumentacionGet")
|
||||
@@ -435,7 +435,7 @@ Public Class ClsEdocumentacion
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
|
||||
@@ -4565,8 +4565,10 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 5)
|
||||
PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
|
||||
PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
|
||||
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
||||
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
||||
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?Op=Cot".ToUpper(), 367)
|
||||
PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
|
||||
PaginaDict.Add("/Ventas/RepRemisionesDetalle.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/Clientes.aspx".ToUpper(), 2017)
|
||||
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/ClientesAbonarH.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
|
||||
|
||||
@@ -3061,7 +3061,7 @@ Namespace Modelos
|
||||
CveCuentaContabilizacion = 0
|
||||
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
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
@@ -4375,7 +4375,7 @@ Namespace Modelos
|
||||
|
||||
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
|
||||
End If
|
||||
|
||||
|
||||
@@ -430,6 +430,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
SeContabilizo = True
|
||||
Else
|
||||
ErrorRegistrar = True
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
@@ -437,10 +438,12 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Not ErrorRegistrar And SeContabilizo Then
|
||||
|
||||
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)
|
||||
CargaDatosCuentas()
|
||||
Else
|
||||
Conta.RollBack()
|
||||
ObjContPaq.Dispose()
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -3878,7 +3878,7 @@ Partial Class Bancos_IE
|
||||
|
||||
'CANCELA IE
|
||||
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
|
||||
MensajeError = "Error al cancelar IE"
|
||||
End If
|
||||
@@ -3909,7 +3909,7 @@ Partial Class Bancos_IE
|
||||
|
||||
'CANCELA IE
|
||||
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
|
||||
MensajeError = "Error al cancelar IE"
|
||||
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 < TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then
|
||||
'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
|
||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||
End If
|
||||
Else
|
||||
'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
|
||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||
End If
|
||||
@@ -4107,7 +4107,7 @@ Partial Class Bancos_IE
|
||||
|
||||
'genera nuevo IE contrario
|
||||
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
|
||||
End If
|
||||
End If
|
||||
@@ -4123,7 +4123,7 @@ Partial Class Bancos_IE
|
||||
Else
|
||||
|
||||
'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
|
||||
End If
|
||||
|
||||
|
||||
@@ -1582,7 +1582,7 @@ Partial Class Bancos_PagoElectronico
|
||||
Else
|
||||
|
||||
'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
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -131,6 +131,14 @@
|
||||
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
|
||||
@@ -81,7 +81,7 @@ Partial Class Compras_ProveedoresAuxiliar
|
||||
|
||||
'Falta PA
|
||||
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
|
||||
GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ")
|
||||
Else
|
||||
|
||||
@@ -1702,7 +1702,9 @@ Partial Class RegPoliza
|
||||
|
||||
If ObjConta.RemovePoliza(IDPoliza) 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
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -1341,11 +1341,30 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
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 IdPoliza > 0 Then
|
||||
If Not ObjConta.RemovePoliza(IdPoliza) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("La Prepóliza ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
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
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
@@ -816,8 +816,15 @@
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RFC.Value</Value>
|
||||
<Value>GOTE811117236</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -832,7 +839,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Left>1.78362in</Left>
|
||||
<Height>0.46414in</Height>
|
||||
<Height>0.56136in</Height>
|
||||
<Width>3.96172in</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
@@ -1121,7 +1128,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!DomicilioExpedicion.Value</Value>
|
||||
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -1135,9 +1142,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Top>0.46414in</Top>
|
||||
<Top>0.58914in</Top>
|
||||
<Left>1.87861in</Left>
|
||||
<Height>0.69679in</Height>
|
||||
<Height>0.6374in</Height>
|
||||
<Width>1.65152in</Width>
|
||||
<ZIndex>13</ZIndex>
|
||||
<Style>
|
||||
@@ -1172,7 +1179,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!DomicilioExpedicion.Value</Value>
|
||||
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -1186,9 +1193,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Top>0.46414in</Top>
|
||||
<Top>0.58914in</Top>
|
||||
<Left>3.84822in</Left>
|
||||
<Height>0.69679in</Height>
|
||||
<Height>0.6374in</Height>
|
||||
<Width>1.786in</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Style>
|
||||
@@ -1219,8 +1226,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.28209in</Top>
|
||||
<Left>0.13897cm</Left>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>0.89901in</Width>
|
||||
<Width>0.85202in</Width>
|
||||
<ZIndex>15</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1294,7 +1302,6 @@
|
||||
<TextRun>
|
||||
<Value>Dirección</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1304,7 +1311,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.53208in</Top>
|
||||
<Left>0.04514in</Left>
|
||||
<Left>0.05471in</Left>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>0.85387in</Width>
|
||||
<ZIndex>17</ZIndex>
|
||||
@@ -1379,9 +1386,8 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuidad</Value>
|
||||
<Value>Ciudad</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1391,7 +1397,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.7682in</Top>
|
||||
<Left>0.04514in</Left>
|
||||
<Left>0.05471in</Left>
|
||||
<Height>0.25in</Height>
|
||||
<Width>0.85387in</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
|
||||
@@ -3375,7 +3375,15 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<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>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
@@ -3388,15 +3396,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Referencia: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Referencia.Value</Value>
|
||||
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
@@ -3411,7 +3411,7 @@
|
||||
<Top>6.7921in</Top>
|
||||
<Left>0.16632cm</Left>
|
||||
<Height>0.36385in</Height>
|
||||
<Width>4.87092in</Width>
|
||||
<Width>4.94037in</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
2548
GPS/Rastreo.aspx
2548
GPS/Rastreo.aspx
File diff suppressed because it is too large
Load Diff
@@ -127,6 +127,7 @@ Partial Class GPS_Rastreo
|
||||
CargaDispositivos()
|
||||
CargaEventos()
|
||||
CargaGrupos()
|
||||
CargaGruposPI()
|
||||
CreaTmpDTDetalle()
|
||||
IndiceGV = 0
|
||||
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")
|
||||
|
||||
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()
|
||||
Dim GPS As New ClsGPS
|
||||
@@ -325,41 +336,33 @@ Partial Class GPS_Rastreo
|
||||
Mensajes = Mensajes + $"{GVRow.DataKey("NoEconomico").ToString},"
|
||||
|
||||
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
|
||||
Dim DtGeocercas As DataTable = Nothing
|
||||
|
||||
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
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
MostrarGeoCercas()
|
||||
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.DtResultados.Rows.Count > 0 Then
|
||||
@@ -572,7 +575,20 @@ Partial Class GPS_Rastreo
|
||||
End If
|
||||
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)
|
||||
Next
|
||||
Next
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
MostrarGeoCercas()
|
||||
End If
|
||||
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
MostrarGeoRutas()
|
||||
End If
|
||||
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
MostrarPuntosDeInteres()
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"No se encontraron resultados")
|
||||
End If
|
||||
@@ -619,15 +635,16 @@ Partial Class GPS_Rastreo
|
||||
Next
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
Dim Dispositivos As String = Equipos.Replace(";", ",").Remove(Equipos.Length - 1, 1)
|
||||
CargaGeocercas(Dispositivos)
|
||||
MostrarGeoCercas()
|
||||
End If
|
||||
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
MostarGeoRutas()
|
||||
MostrarGeoRutas()
|
||||
End If
|
||||
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
MostrarPuntosDeInteres()
|
||||
End If
|
||||
|
||||
RegistraScript("setTimeout(function(){ $('#LnkMostarGeocercas').css('display', 'block'); },1000);")
|
||||
Else
|
||||
Alert($"No se encontraron resultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -702,29 +719,47 @@ Partial Class GPS_Rastreo
|
||||
GPS.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGeocercas(Dispositivos As String)
|
||||
Dim DtGeocercas As DataTable = Nothing
|
||||
|
||||
Dim ObjGPSGeo As New ClsGPS
|
||||
If ObjGPSGeo.GetReferenciaDetalle(-1, -1, -1, UsuarioActual.CveCliente) Then
|
||||
DtGeocercas = ObjGPSGeo.DtResultados.FiltraParametros("EsParada = False AND Tipo='Geocerca' AND Estatus = 1")
|
||||
End If
|
||||
ObjGPSGeo.Dispose()
|
||||
|
||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
||||
If DtGeocercas IsNot Nothing Then
|
||||
Dim DtParadasDispositivo = DtGeocercas.FiltraParametros($"CveDispositivo IN({Dispositivos})", "", {"Color", "GeoReferencia", "Coordenadas"})
|
||||
Dim SbJS As New StringBuilder
|
||||
SbJS.Append("$('#LnkMostarGeocercas').css('display', 'block'); setTimeout(function(){ ")
|
||||
For Each Dr As DataRow In DtParadasDispositivo.Rows
|
||||
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
|
||||
Try
|
||||
Dim DtGeocercas As DataTable = Nothing
|
||||
|
||||
Dim ObjGPSGeo As New ClsGPS
|
||||
If ObjGPSGeo.GetReferenciaDetalle(-1, -1, -1, UsuarioActual.CveCliente) Then
|
||||
DtGeocercas = ObjGPSGeo.DtResultados.FiltraParametros("EsParada = False AND Tipo='Geocerca' AND Estatus = 1")
|
||||
End If
|
||||
ObjGPSGeo.Dispose()
|
||||
|
||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
||||
If DtGeocercas IsNot Nothing Then
|
||||
Dim DtParadasDispositivo = DtGeocercas.FiltraParametros($"CveDispositivo IN({Dispositivos})", DistinctColumns:={"GeoReferencia", "Coordenadas", "Color"})
|
||||
|
||||
GvGeoCercas.DataSource = DtParadasDispositivo
|
||||
GvGeoCercas.DataBind()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar las geocercas", ex)
|
||||
End Try
|
||||
UpGeoCercas.Update()
|
||||
End Sub
|
||||
Private Sub MostarGeoRutas()
|
||||
Private Sub MostrarGeoCercas()
|
||||
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
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
@@ -736,6 +771,20 @@ Partial Class GPS_Rastreo
|
||||
End If
|
||||
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
|
||||
Protected Sub TimmerRefresh_Tick(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -778,7 +827,6 @@ Partial Class GPS_Rastreo
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If chkTrazarLinea.Checked Then
|
||||
TrazarLineaContinuo = True
|
||||
CreaDTCoordenadas()
|
||||
@@ -1144,10 +1192,18 @@ Partial Class GPS_Rastreo
|
||||
|
||||
Protected Sub CargaOpcion(opcion As String)
|
||||
TimmerRefresh.Enabled = False
|
||||
HdnOpcion.Value = opcion
|
||||
HdnOpcion.Value = opcion
|
||||
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
|
||||
chkTrazarLinea.Checked = False
|
||||
ChkTrazarGeocercas.Checked = False
|
||||
ChkTrazarGeorutas.Checked = False
|
||||
ChkTrazarPuntosInteres.Checked = False
|
||||
|
||||
chkTrazarLinea.Visible = False
|
||||
ChkTrazarGeocercas.Visible = False
|
||||
DvPaginacion.Visible = False
|
||||
rowImpresionesKM.Visible = False
|
||||
If opcion = "All" Then
|
||||
@@ -1158,6 +1214,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvTrazoPI.Visible = True
|
||||
ChkTrazarGeocercas.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
@@ -1172,6 +1229,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvMinutos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
@@ -1184,6 +1242,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1 AND LimiteVelocidad = 1")
|
||||
@@ -1201,6 +1260,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvMinutos.Visible = True
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||
@@ -1214,6 +1274,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvMinutos.Visible = False
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||
@@ -1223,8 +1284,9 @@ Partial Class GPS_Rastreo
|
||||
dvFechas.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvTrazoPI.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
@@ -1236,23 +1298,13 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = True
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvTrazoPI.Visible = True
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
myModalLabel2.InnerHtml = "Rastreo Continuo"
|
||||
chkTrazarLinea.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
|
||||
dvFechas.Visible = True
|
||||
dvDispositivos.Visible = False
|
||||
@@ -1260,6 +1312,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
@@ -1267,7 +1320,11 @@ Partial Class GPS_Rastreo
|
||||
ElseIf opcion = "TPS" Then
|
||||
dvFechas.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
dvMinutos.Visible = False
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
DivFechasGVBarra.Visible = False
|
||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("CveModelo = 17")
|
||||
GvDispositivos.DataBind()
|
||||
@@ -1275,24 +1332,35 @@ Partial Class GPS_Rastreo
|
||||
dvEventos.Visible = False
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
myModalLabel2.InnerHtml = "Contador de pasajeros"
|
||||
End If
|
||||
|
||||
If Not dvTrazoGeo.Visible Then
|
||||
RegistraScript("$('#LnkMostarGeocercas').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If dvTrazoRutas.Visible Then
|
||||
CargaGeoRutas()
|
||||
Else
|
||||
RegistraScript("$('#LnkMostarGeoRutas').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If dvTrazoPI.Visible Then
|
||||
CargaPI()
|
||||
Else
|
||||
RegistraScript("$('#LnkMostarPI').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If opcion <> "Speed" AndAlso opcion <> "TPS" AndAlso Filtrado Then
|
||||
CargaDispositivos()
|
||||
Filtrado = False
|
||||
End If
|
||||
|
||||
RegistraScript("$(""#h"").modal('hide');
|
||||
$(""#ShowDiv3"").css(""line-height"", ""20px"");
|
||||
open = false;
|
||||
$(""#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")
|
||||
|
||||
|
||||
|
||||
UPConsulta.Update()
|
||||
End Sub
|
||||
|
||||
@@ -2158,12 +2226,39 @@ Partial Class GPS_Rastreo
|
||||
End Using
|
||||
Return retorno
|
||||
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)
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
RegistraScript("$('#DivGeoRutas').modal('show');")
|
||||
End If
|
||||
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()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
@@ -2175,6 +2270,49 @@ Partial Class GPS_Rastreo
|
||||
|
||||
UpGeorutas.Update()
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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