Empresas Zona Horaria
This commit is contained in:
@@ -234,7 +234,7 @@ Partial Class GPS_CatDistribuidoresMaster
|
||||
strBody.Append(" <table class=""mitablita"" style=""font-family: Helvetica, sans-serif;"">")
|
||||
strBody.Append(" <tr>")
|
||||
strBody.Append(" <td>Fecha: ")
|
||||
strBody.Append(DateTime.Now.ToString("dd/MM/yy"))
|
||||
strBody.Append(NowADS().ToString("dd/MM/yy"))
|
||||
strBody.Append(" </td> <td>")
|
||||
strBody.Append("</td> </tr>")
|
||||
strBody.Append(" <tr>")
|
||||
|
||||
@@ -231,7 +231,7 @@ Partial Class GPS_CatDistribuidoresMaster
|
||||
strBody.Append(" <table class=""mitablita"" style=""font-family: Helvetica, sans-serif;"">")
|
||||
strBody.Append(" <tr>")
|
||||
strBody.Append(" <td>Fecha: ")
|
||||
strBody.Append(DateTime.Now.ToString("dd/MM/yy"))
|
||||
strBody.Append(NowADS().ToString("dd/MM/yy"))
|
||||
strBody.Append(" </td> <td>")
|
||||
strBody.Append("</td> </tr>")
|
||||
strBody.Append(" <tr>")
|
||||
|
||||
@@ -80,7 +80,7 @@ Partial Class GPS_CatReportesProgramados
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDias()
|
||||
Select Case Now.DayOfWeek.ToString
|
||||
Select Case NowADS().DayOfWeek.ToString
|
||||
Case "Monday"
|
||||
ChkDiasSemana.Items(0).Selected = True
|
||||
Case "Tuesday"
|
||||
|
||||
@@ -55,8 +55,8 @@ Partial Class GPS_Conductores
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaFechas()
|
||||
txtFechaI.Text = $"01/{Now.Month}/{Now.Year} 00:00"
|
||||
txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy") + " 23:59"
|
||||
txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year} 00:00"
|
||||
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") + " 23:59"
|
||||
End Sub
|
||||
#Region "Conductores"
|
||||
|
||||
|
||||
@@ -42,11 +42,11 @@ Partial Class DashboardGPS
|
||||
If Not Page.IsPostBack Then
|
||||
StrArreglo = New StringBuilder
|
||||
|
||||
txtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
FechaI = txtFechaI.Text.ToDate.Add(Now.TimeOfDay).ToDateTime
|
||||
FechaF = txtFechaF.Text.ToDate.Add(Now.TimeOfDay).ToDateTime
|
||||
FechaI = txtFechaI.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime
|
||||
FechaF = txtFechaF.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime
|
||||
|
||||
CargarKilometrajeUnidades(5)
|
||||
CargarPuntosInteresVisitados(10)
|
||||
@@ -238,7 +238,7 @@ Partial Class DashboardGPS
|
||||
|
||||
StrArreglo.Clear()
|
||||
|
||||
If ObjGPS.GetKilometrajeDispositivos(UsuarioActual.CveCliente, txtFechaI.Text.ToDate.Add(Now.TimeOfDay).ToDateTime, txtFechaF.Text.ToDate.Add(Now.TimeOfDay).ToDateTime, Top) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
If ObjGPS.GetKilometrajeDispositivos(UsuarioActual.CveCliente, txtFechaI.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime, txtFechaF.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime, Top) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
StrArreglo.Append("[")
|
||||
|
||||
@@ -347,7 +347,7 @@ Partial Class DashboardGPS
|
||||
LblDesconexion.Text = ObjGPS.DtResultados(0)("DesconexionBateria").ToString.ToEntero.ToString
|
||||
End If
|
||||
|
||||
If ObjGPS.GetRalentiDashboard(UsuarioActual.CveCliente, txtFechaI.Text.ToDate.Add(Now.TimeOfDay).ToDateTime, txtFechaF.Text.ToDate.Add(Now.TimeOfDay).ToDateTime) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
If ObjGPS.GetRalentiDashboard(UsuarioActual.CveCliente, txtFechaI.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime, txtFechaF.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
LblRalenti.Text = ObjGPS.DtResultados(0)("Ralenti").ToString.ToEntero.ToString
|
||||
End If
|
||||
|
||||
@@ -363,10 +363,10 @@ Partial Class DashboardGPS
|
||||
If HdnTipoFecha.Value = "5" Then
|
||||
FechaI = txtFechaI.Text.ToDateTime
|
||||
Else
|
||||
FechaI = txtFechaI.Text.ToDate.Add(Now.TimeOfDay).ToDateTime
|
||||
FechaI = txtFechaI.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime
|
||||
End If
|
||||
|
||||
FechaF = txtFechaF.Text.ToDate.Add(Now.TimeOfDay).ToDateTime
|
||||
FechaF = txtFechaF.Text.ToDate.Add(NowADS().TimeOfDay).ToDateTime
|
||||
|
||||
StrArreglo = New StringBuilder
|
||||
|
||||
@@ -388,31 +388,31 @@ Partial Class DashboardGPS
|
||||
Select Case HdnTipoFecha.Value.ToString.ToEntero
|
||||
|
||||
Case 1 'Ultimo Dia
|
||||
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().AddDays(-1).ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 2 'Ultima Semana
|
||||
txtFechaI.Text = Now.AddDays(-7).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().AddDays(-7).ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 3 'Ultimo Mes
|
||||
txtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 4 'Ultimo Año
|
||||
txtFechaI.Text = Now.AddYears(-1).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 5 'Dia Corriente
|
||||
txtFechaI.Text = Now.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 6 'Semana Corriente
|
||||
Dim DiaSemana = Now.DayOfWeek
|
||||
txtFechaI.Text = Now.AddDays((-1 * DiaSemana) + 1).ToString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
Dim DiaSemana = NowADS().DayOfWeek
|
||||
txtFechaI.Text = NowADS().AddDays((-1 * DiaSemana) + 1).ToString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 7 'Mes Corriente
|
||||
txtFechaI.Text = DateSerial(Year(Now), Month(Now), 1).ToString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
Case 8 'Año Corriente
|
||||
Dim DiaAño = Now.DayOfYear
|
||||
txtFechaI.Text = Now.AddDays((-1 * DiaAño) + 1).ToString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
Dim DiaAño = NowADS().DayOfYear
|
||||
txtFechaI.Text = NowADS().AddDays((-1 * DiaAño) + 1).ToString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
@@ -183,23 +183,23 @@ Partial Class GPS_Rastreo
|
||||
|
||||
'Private Sub CargaFechasPredeterminadas(Opcion As String)
|
||||
' If Opcion = "2" Then
|
||||
' txtFechaI.Text = DateTime.Now.AddHours(-2).ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaI.Text = NowADS().AddHours(-2).ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy hh:mm")
|
||||
' ElseIf Opcion = "8" Then
|
||||
' txtFechaI.Text = DateTime.Now.AddHours(-8).ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaI.Text = NowADS().AddHours(-8).ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy hh:mm")
|
||||
' ElseIf Opcion = "24" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59"
|
||||
' txtFechaI.Text = $"{NowADS().ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
|
||||
' ElseIf Opcion = "48" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59"
|
||||
' txtFechaI.Text = $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59"
|
||||
' ElseIf Opcion = "Week" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaI.Text = $"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy hh:mm")
|
||||
' ElseIf Opcion = "Month" Then
|
||||
' txtFechaI.Text = $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm")
|
||||
' txtFechaI.Text = $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy hh:mm")
|
||||
' End If
|
||||
|
||||
' RegistraScript("CargaPickers();")
|
||||
@@ -261,7 +261,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, "ReporteProgramado", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
@@ -313,7 +313,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, "ReporteProgramado", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Partial Class GPS_FacturasSims
|
||||
End Sub
|
||||
Protected Sub CargaFacturasSims()
|
||||
Dim ObjFact As New ClsGPS()
|
||||
Dim periodo As Integer = 0 ' DateTime.Now.ToString("yyyyMM").ToEntero()
|
||||
Dim periodo As Integer = 0 ' NowADS().ToString("yyyyMM").ToEntero()
|
||||
TxtPeriodo.Text = TxtPeriodo.Text.Replace("_", "0")
|
||||
If TxtPeriodo.Text.Trim().Length > 6 Then
|
||||
periodo = String.Format("{1}{0}", TxtPeriodo.Text.Substring(0, 2), TxtPeriodo.Text.Substring(3, 4)).ToEntero()
|
||||
|
||||
@@ -125,7 +125,7 @@ Partial Class GPS_GeoReferencias
|
||||
Next
|
||||
GeoRefString = GeoRefString.Substring(0, GeoRefString.Length - 1)
|
||||
GeoRefString = $"LINESTRING({GeoRefString})"
|
||||
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Ruta", True, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, ($"{Date.Now.ToShortDateString} {TxtHoraI.Text}").ToDateTime, ($"{Date.Now.ToShortDateString} {TxtHoraF.Text}").ToDateTime, hdnColor.Value, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Ruta", True, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, ($"{NowADS().ToShortDateString} {TxtHoraI.Text}").ToDateTime, ($"{NowADS().ToShortDateString} {TxtHoraF.Text}").ToDateTime, hdnColor.Value, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
For Each Dr As GridViewRow In GvDispositivos.Rows
|
||||
If Dr.RowType = DataControlRowType.DataRow Then
|
||||
If Not ObjGPS.AddGeoReferenciaDetalle(ObjGPS.CveGeoReferencia, Dr.DataKey("CveDispositivo").ToString.ToEntero) Then
|
||||
@@ -140,7 +140,7 @@ Partial Class GPS_GeoReferencias
|
||||
'RegistraScript("CreaRuta();")
|
||||
ElseIf HdnTipo.Value = "Geocerca" Then
|
||||
GeoRefString = $"POLYGON(({GeoCerca.Value} {CommandArg.Value}))"
|
||||
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Geocerca", True, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, ($"{Date.Now.ToShortDateString} {TxtHoraI.Text}").ToDateTime, ($"{Date.Now.ToShortDateString} {TxtHoraF.Text}").ToDateTime, hdnColor.Value, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Geocerca", True, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, ($"{NowADS().ToShortDateString} {TxtHoraI.Text}").ToDateTime, ($"{NowADS().ToShortDateString} {TxtHoraF.Text}").ToDateTime, hdnColor.Value, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
For Each Dr As GridViewRow In GvDispositivos.Rows
|
||||
If Dr.RowType = DataControlRowType.DataRow Then
|
||||
If Not ObjGPS.AddGeoReferenciaDetalle(ObjGPS.CveGeoReferencia, Dr.DataKey("CveDispositivo").ToString.ToEntero) Then
|
||||
|
||||
@@ -1267,7 +1267,7 @@
|
||||
itemsCounter--;
|
||||
}
|
||||
|
||||
// now we should have a 2 dimensional array with a list of a list of waypoints
|
||||
// NowADS() we should have a 2 dimensional array with a list of a list of waypoints
|
||||
var combinedResults;
|
||||
var unsortedResults = [{}]; // to hold the counter and the results themselves as they come back, to later sort
|
||||
var directionsResultsReturned = 0;
|
||||
|
||||
@@ -1117,38 +1117,38 @@ Partial Class GPS_Rastreo
|
||||
|
||||
If Opcion = "2" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", DateTime.Now.AddHours(-2).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", NowADS().AddHours(-2).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "8" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", DateTime.Now.AddHours(-8).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", NowADS().AddHours(-8).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "24" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59")
|
||||
New JProperty("FechaI", $"{NowADS().ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{NowADS().ToString("dd/MM/yyyy")} 23:59")
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "48" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59")
|
||||
New JProperty("FechaI", $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59")
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "Week" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", $"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "Month" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
End If
|
||||
@@ -1158,23 +1158,23 @@ Partial Class GPS_Rastreo
|
||||
|
||||
'Private Sub CargaFechasPredeterminadas(Opcion As String)
|
||||
' If Opcion = "2" Then
|
||||
' txtFechaI.Text = DateTime.Now.AddHours(-2).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = NowADS().AddHours(-2).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' ElseIf Opcion = "8" Then
|
||||
' txtFechaI.Text = DateTime.Now.AddHours(-8).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = NowADS().AddHours(-8).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' ElseIf Opcion = "24" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59"
|
||||
' txtFechaI.Text = $"{NowADS().ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
|
||||
' ElseIf Opcion = "48" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59"
|
||||
' txtFechaI.Text = $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59"
|
||||
' ElseIf Opcion = "Week" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = $"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' ElseIf Opcion = "Month" Then
|
||||
' txtFechaI.Text = $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' End If
|
||||
|
||||
' ' RegistraScript("CargaPickers();")
|
||||
@@ -1587,11 +1587,11 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
End Try
|
||||
@@ -1708,7 +1708,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("NombreEmpresa", nombreCliente))
|
||||
RptParametro.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
@@ -1730,8 +1730,8 @@ Partial Class GPS_Rastreo
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
End Try
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
DtDatos.Clear()
|
||||
Else
|
||||
If GvBarra.Rows.Count > 0 Then
|
||||
@@ -1756,7 +1756,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
If Opcion = "Idle" Then
|
||||
@@ -1799,8 +1799,8 @@ Partial Class GPS_Rastreo
|
||||
|
||||
ImprimirExcelG(DtDatos, "ReporteKMRecorridos.xlsx", "Reporte de KM Recorridos", filtros)
|
||||
Else
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
End If
|
||||
|
||||
|
||||
@@ -1996,7 +1996,7 @@ Partial Class GPS_Rastreo
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = UsuarioActual.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
'Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
@@ -2072,7 +2072,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New CrystalParametro("FechaImpresion", NowADS().ToString))
|
||||
RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DtPosiciones.SUM("KMRecorridos").ToString} KM"))
|
||||
RptParametro.Add(New CrystalParametro("NombreEmpresa", nombreCliente))
|
||||
RptParametro.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
@@ -2240,7 +2240,7 @@ Partial Class GPS_Rastreo
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = UsuarioActual.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
@@ -2280,7 +2280,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("KMRecorridos", DtPosiciones.SUM("KMRecorridos").ToString))
|
||||
|
||||
@@ -2317,7 +2317,7 @@ Partial Class GPS_Rastreo
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
End Try
|
||||
ImprimirbytesPDF(StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}_{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC"), $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
ImprimirbytesPDF(StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}_{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC"), $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
|
||||
DtDatos.Clear()
|
||||
End Sub
|
||||
@@ -2385,12 +2385,12 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", TxtFechaGVI.Text.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", TxtFechaGVF.Text.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtHistorialPasajeros, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
retorno = StreamPDF(RutaReporte, DtHistorialPasajeros, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}")
|
||||
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
|
||||
@@ -1161,7 +1161,7 @@
|
||||
itemsCounter--;
|
||||
}
|
||||
|
||||
// now we should have a 2 dimensional array with a list of a list of waypoints
|
||||
// NowADS() we should have a 2 dimensional array with a list of a list of waypoints
|
||||
var combinedResults;
|
||||
var unsortedResults = [{}]; // to hold the counter and the results themselves as they come back, to later sort
|
||||
var directionsResultsReturned = 0;
|
||||
|
||||
@@ -1066,38 +1066,38 @@ Partial Class GPS_Rastreo2
|
||||
|
||||
If Opcion = "2" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", DateTime.Now.AddHours(-2).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", NowADS().AddHours(-2).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "8" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", DateTime.Now.AddHours(-8).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", NowADS().AddHours(-8).ToString("dd/MM/yyyy HH:mm")),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "24" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59")
|
||||
New JProperty("FechaI", $"{NowADS().ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{NowADS().ToString("dd/MM/yyyy")} 23:59")
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "48" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59")
|
||||
New JProperty("FechaI", $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59")
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "Week" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", $"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
ElseIf Opcion = "Month" Then
|
||||
Dim JsonFecha As New JObject(
|
||||
New JProperty("FechaI", $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))
|
||||
New JProperty("FechaI", $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")} 0:00"),
|
||||
New JProperty("FechaF", NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||
)
|
||||
StrFecha = JsonFecha.ToString
|
||||
End If
|
||||
@@ -1107,23 +1107,23 @@ Partial Class GPS_Rastreo2
|
||||
|
||||
'Private Sub CargaFechasPredeterminadas(Opcion As String)
|
||||
' If Opcion = "2" Then
|
||||
' txtFechaI.Text = DateTime.Now.AddHours(-2).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = NowADS().AddHours(-2).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' ElseIf Opcion = "8" Then
|
||||
' txtFechaI.Text = DateTime.Now.AddHours(-8).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = NowADS().AddHours(-8).ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' ElseIf Opcion = "24" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59"
|
||||
' txtFechaI.Text = $"{NowADS().ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
|
||||
' ElseIf Opcion = "48" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59"
|
||||
' txtFechaI.Text = $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = $"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59"
|
||||
' ElseIf Opcion = "Week" Then
|
||||
' txtFechaI.Text = $"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = $"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' ElseIf Opcion = "Month" Then
|
||||
' txtFechaI.Text = $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm")
|
||||
' txtFechaI.Text = $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")} 0:00"
|
||||
' txtFechaF.Text = NowADS().ToString("dd/MM/yyyy HH:mm")
|
||||
' End If
|
||||
|
||||
' ' RegistraScript("CargaPickers();")
|
||||
@@ -1484,11 +1484,11 @@ Partial Class GPS_Rastreo2
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -1511,7 +1511,7 @@ Partial Class GPS_Rastreo2
|
||||
RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New CrystalParametro("MapaURL", ""))
|
||||
RptParametro.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New CrystalParametro("FechaImpresion", NowADS().ToShortDateString))
|
||||
RptParametro.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New CrystalParametro("KMRecorridos", DtPosiciones.SUM("KMRecorridos").ToString))
|
||||
|
||||
@@ -1551,14 +1551,14 @@ Partial Class GPS_Rastreo2
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/ReportesProgramados/RPTHistorico.rpt"), DtDatos, RptParametro, NombreReporte), "LibroDiario")
|
||||
|
||||
'retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}_{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
'retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}_{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
'If Opcion = "Idle" Then
|
||||
' RptParametro.Add(New ReportParameter("TiempoMuerto", TxtMinutos.Text + " Minutos"))
|
||||
'End If
|
||||
'retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
'retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
'ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
'ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
|
||||
DtDatos.Clear()
|
||||
|
||||
@@ -1584,7 +1584,7 @@ Partial Class GPS_Rastreo2
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
If Opcion = "Idle" Then
|
||||
@@ -1612,7 +1612,7 @@ Partial Class GPS_Rastreo2
|
||||
Next
|
||||
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
|
||||
|
||||
@@ -1627,7 +1627,7 @@ Partial Class GPS_Rastreo2
|
||||
'LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = retorno, .NombreArchivo = "ReporteProgramado.pdf"})
|
||||
'LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = Xml})
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
|
||||
DtDatos.Clear()
|
||||
|
||||
@@ -1705,12 +1705,12 @@ Partial Class GPS_Rastreo2
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", TxtFechaGVI.Text.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", TxtFechaGVF.Text.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtHistorialPasajeros, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
retorno = StreamPDF(RutaReporte, DtHistorialPasajeros, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}")
|
||||
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
|
||||
@@ -377,7 +377,7 @@ Partial Class GPS_RastreoTrayectos
|
||||
End Function
|
||||
Public Sub RegistraScript(Script As String, Optional valuetick As String = "")
|
||||
Dim Rdm As Random = New Random()
|
||||
ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (DateTime.Now.Ticks + 1), Rdm.Next(), valuetick), String.Format("<script type='text/javascript' language='javascript'>{0}</script>", Script), False)
|
||||
ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (NowADS().Ticks + 1), Rdm.Next(), valuetick), String.Format("<script type='text/javascript' language='javascript'>{0}</script>", Script), False)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -68,8 +68,8 @@ Partial Class GPS_RepCombustible
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDispositivos()
|
||||
txtFechaI.Text = $"{Now.FirstDayOfMonth.ToString("dd/MM/yyyy")} 00:00"
|
||||
txtFechaF.Text = $"{Now.LastDayOfMonth.ToString("dd/MM/yyyy")} 00:00"
|
||||
txtFechaI.Text = $"{NowADS().FirstDayOfMonth.ToString("dd/MM/yyyy")} 00:00"
|
||||
txtFechaF.Text = $"{NowADS().LastDayOfMonth.ToString("dd/MM/yyyy")} 00:00"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -257,7 +257,7 @@ Partial Class GPS_RepCombustible
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString("dd/MM/yyyy HH:mm")))
|
||||
RptParametro.Add(New ReportParameter("ChartBase64", HdnChartBase64.Value, True))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy")))
|
||||
|
||||
RptParametro.Add(New ReportParameter("ComInicialLTS", LtlCombustibleInicial.Text))
|
||||
RptParametro.Add(New ReportParameter("ComInicialTotal", LtlCostoInicial.Text))
|
||||
@@ -325,7 +325,7 @@ Partial Class GPS_RepCombustible
|
||||
End Using
|
||||
libro.Cell(1, 3).Value = NombreCliente
|
||||
libro.Cell(2, 3).Value = "Reporte de Combustible"
|
||||
libro.Cell(4, 12).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
libro.Cell(4, 12).Value = NowADS().ToString("dd/MM/yyyy")
|
||||
libro.Cell(4, 4).Value = txtFechaI.Text
|
||||
libro.Cell(5, 4).Value = txtFechaF.Text
|
||||
Dim cRow As Integer = 9
|
||||
|
||||
@@ -21,7 +21,7 @@ Partial Class GPS_RepCombustible2
|
||||
|
||||
Public Sub RegistraScript(Script As String, Optional valuetick As String = "")
|
||||
Dim Rdm As Random = New Random()
|
||||
ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (DateTime.Now.Ticks + 1), Rdm.Next(), valuetick), String.Format("<script type='text/javascript' language='javascript'>{0}</script>", Script), False)
|
||||
ScriptManager.RegisterStartupScript(Page, Me.GetType(), String.Format("{0}{1}{2}", (NowADS().Ticks + 1), Rdm.Next(), valuetick), String.Format("<script type='text/javascript' language='javascript'>{0}</script>", Script), False)
|
||||
End Sub
|
||||
Property DTCargasDescargas As DataTable
|
||||
Get
|
||||
@@ -82,8 +82,8 @@ Partial Class GPS_RepCombustible2
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDispositivos()
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ Partial Class GPS_RepEventos
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00"
|
||||
txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59"
|
||||
txtFechaI.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00"
|
||||
txtFechaF.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
|
||||
CargaGrupos()
|
||||
End If
|
||||
End Sub
|
||||
@@ -132,7 +132,7 @@ Partial Class GPS_RepEventos
|
||||
RptParametro.Add(New ReportParameter("FechaFin", txtFechaF.Text.ToDateTime().ToString("dd/MM/yyyy HH:mm")))
|
||||
RptParametro.Add(New ReportParameter("ChartBase64", HdnImagen.Value, True))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy")))
|
||||
RptParametro.Add(New ReportParameter("NoExcesosVelocidad", Excesos.ToString))
|
||||
RptParametro.Add(New ReportParameter("NoAceleraciones", Aceleraciones.ToString))
|
||||
RptParametro.Add(New ReportParameter("NoColisiones", NoColisiones.ToString))
|
||||
|
||||
@@ -25,8 +25,8 @@ Partial Class GPS_RepGastos
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -252,8 +252,8 @@ Partial Class GPS_RepGeoReferencias
|
||||
ObjGPS.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
Try
|
||||
Dim HoraI As Date = ($"{Date.Now.ToString("dd/MM/yyyy")} {TxtHoraI.Text}").ToDate
|
||||
Dim HoraF As Date = ($"{Date.Now.ToString("dd/MM/yyyy")} {TxtHoraF.Text}").ToDate
|
||||
Dim HoraI As Date = ($"{NowADS().ToString("dd/MM/yyyy")} {TxtHoraI.Text}").ToDate
|
||||
Dim HoraF As Date = ($"{NowADS().ToString("dd/MM/yyyy")} {TxtHoraF.Text}").ToDate
|
||||
|
||||
If ObjGPS.GeoReferenciaUpdate(CveGeoReferencia, TxtNombre.Text, -1, chkEstatus.Checked, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked,
|
||||
chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
|
||||
@@ -37,8 +37,8 @@ public partial class GPS_RepIgnicion : ClsPaginas
|
||||
}
|
||||
private void CargaFecha()
|
||||
{
|
||||
txtFechaI.Text = $"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 00:00";
|
||||
txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59";
|
||||
txtFechaI.Text = $"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 00:00";
|
||||
txtFechaF.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59";
|
||||
}
|
||||
private void CargaDispositivos()
|
||||
{
|
||||
@@ -124,7 +124,7 @@ public partial class GPS_RepIgnicion : ClsPaginas
|
||||
RptParametro.Add(new ReportParameter("FechaInicio", txtFechaI.Text.ToDateTime().ToString("dd/MM/yyyy HH:mm")));
|
||||
RptParametro.Add(new ReportParameter("FechaFin", txtFechaF.Text.ToDateTime().ToString("dd/MM/yyyy HH:mm")));
|
||||
RptParametro.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Usuario));
|
||||
RptParametro.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy HH:mm tt")));
|
||||
RptParametro.Add(new ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy HH:mm tt")));
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtIgniciones, RptParametro, "ReporteEventos", Formato, "DsOC");
|
||||
// TODO: Labeled Arguments not supported. Argument: 6 := 'MR'
|
||||
|
||||
@@ -46,8 +46,8 @@ public partial class GPS_RepParardas : ClsPaginas
|
||||
}
|
||||
private void CargaFecha()
|
||||
{
|
||||
txtFechaI.Text = DateTime.Now.ToString("dd/MM/yyyy") + " 00:00";
|
||||
txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy") + " 23:59";
|
||||
txtFechaI.Text = NowADS().ToString("dd/MM/yyyy") + " 00:00";
|
||||
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") + " 23:59";
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
@@ -172,13 +172,13 @@ public partial class GPS_RepParardas : ClsPaginas
|
||||
RptParametro.Add(new ReportParameter("FechaInicio", txtFechaI.Text.ToString()));
|
||||
RptParametro.Add(new ReportParameter("FechaFin", txtFechaF.Text.ToString()));
|
||||
RptParametro.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Usuario));
|
||||
RptParametro.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString()));
|
||||
RptParametro.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString()));
|
||||
RptParametro.Add(new ReportParameter("Grupo", Grupo));
|
||||
RptParametro.Add(new ReportParameter("TotalGeneral", TotalGeneral));
|
||||
RptParametro.Add(new ReportParameter("NumEventos", NumEventos));
|
||||
RptParametro.Add(new ReportParameter("MejorConductor", MejorC));
|
||||
retorno = StreamPDF(RutaReporte, DtParadas, RptParametro, string.Format("{0}{1}", NombreReporte, DateTime.Now.ToShortDateString()), TipoDoc, "DsOC");
|
||||
ImprimirbytesPDF(retorno, string.Format("{0}{1}", NombreReporte, DateTime.Now.ToShortDateString()));
|
||||
retorno = StreamPDF(RutaReporte, DtParadas, RptParametro, string.Format("{0}{1}", NombreReporte, NowADS().ToShortDateString()), TipoDoc, "DsOC");
|
||||
ImprimirbytesPDF(retorno, string.Format("{0}{1}", NombreReporte, NowADS().ToShortDateString()));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -100,8 +100,8 @@ public partial class GPS_RepPasajero : ClsPaginas
|
||||
}
|
||||
private void CargaFecha()
|
||||
{
|
||||
txtFechaI.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00";
|
||||
txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59";
|
||||
txtFechaI.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00";
|
||||
txtFechaF.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59";
|
||||
}
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -146,13 +146,13 @@ Partial Class GPS_RepPasajeros
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", txtFechaI.Text.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", txtFechaF.Text.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("TotalAscensos", ObjGPS.DtResultados.FiltroPrimeroValor("Ascensos", "Fecha IS NULL")))
|
||||
RptParametro.Add(New ReportParameter("TotalDescensos", ObjGPS.DtResultados.FiltroPrimeroValor("Descensos", "Fecha IS NULL")))
|
||||
|
||||
retorno = StreamPDF(RutaReporte, ObjGPS.DtResultados, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
retorno = StreamPDF(RutaReporte, ObjGPS.DtResultados, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", "PDF", MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}")
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}")
|
||||
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
|
||||
@@ -42,8 +42,8 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
DtDatosReporte = Nothing
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = Now.AddDays(-7).ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().AddDays(-7).ToString("dd/MM/yyyy")
|
||||
|
||||
CargaDispositivos()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
@@ -265,16 +265,16 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", txtFechaF.Text))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("Cliente", Nombre))
|
||||
|
||||
'Dim MR = New ReportViewer
|
||||
'MR.LocalReport.EnableHyperlinks = True
|
||||
'MR.HyperlinkTarget = "_blank"
|
||||
|
||||
Dim retorno = StreamPDF(RutaReporte, DtDatosReporte, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
Dim retorno = StreamPDF(RutaReporte, DtDatosReporte, RptParametro, $"{NombreReporte}{NowADS().ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{NowADS().ToShortDateString}", Format)
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
End Try
|
||||
@@ -410,7 +410,7 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = UsuarioActual.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
'Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Partial Class GPS_Trayectos
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
txtFechaI.Text = Now.AddMonths(-1).ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().AddMonths(-1).ToString("dd/MM/yyyy")
|
||||
CargaDatos()
|
||||
TimmerRefresh.Enabled = ChkTimmer.Checked
|
||||
End If
|
||||
@@ -209,7 +209,7 @@ Partial Class GPS_Trayectos
|
||||
ObjGPS.IniciaTransacSQL()
|
||||
|
||||
Try
|
||||
Dim CveTrayecto As Integer = ObjGPS.AddTrayecto(Nombre, DateTime.Now, "", CveDispositivo, UsuarioActual.CveCliente, EnviarNotificacion:=ChkNotificacion.Checked,
|
||||
Dim CveTrayecto As Integer = ObjGPS.AddTrayecto(Nombre, NowADS(), "", CveDispositivo, UsuarioActual.CveCliente, EnviarNotificacion:=ChkNotificacion.Checked,
|
||||
CorreosNotificacion:=TxtCorreoNot.Text, Intervalo:=If(ChkNotificacion.Checked, DdlIntervalo.SelectedValue.ToEntero(), 0),
|
||||
EnviarLiga:=ChkEnviarLiga.Checked)
|
||||
|
||||
@@ -261,7 +261,7 @@ Partial Class GPS_Trayectos
|
||||
Dim Nombre As String = TxtNombreNuevo.Text
|
||||
Dim CveDispositivo As Integer = DdlDispositivoNuevo.SelectedValue.ToEntero
|
||||
If CveDispositivo > 0 Then
|
||||
Dim CveTrayectoNuevo As Integer = ObjGPS.AddTrayecto(Nombre, DateTime.Now, "", CveDispositivo, UsuarioActual.CveCliente, EnviarNotificacion:=ChkNotificarApartirDe.Checked,
|
||||
Dim CveTrayectoNuevo As Integer = ObjGPS.AddTrayecto(Nombre, NowADS(), "", CveDispositivo, UsuarioActual.CveCliente, EnviarNotificacion:=ChkNotificarApartirDe.Checked,
|
||||
CorreosNotificacion:=TxtCorreNotApartidDe.Text, Intervalo:=If(ChkNotificarApartirDe.Checked, DdlIntervaloAPartirDe.SelectedValue.ToEntero(), 0),
|
||||
EnviarLiga:=ChkEnviarLigaApartirDe.Checked)
|
||||
If CveTrayectoNuevo > 0 Then
|
||||
|
||||
@@ -90,8 +90,8 @@ Partial Class GPS_Vehiculos
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
Dim RowDis As DataRow = DtDIS.Rows(0)
|
||||
Dim EsCanBus As Boolean = RowDis("CveModelo").ToString().ToEntero.Contiene(15, 16, 30)
|
||||
FechaI = New DateTime(Now.Year, Now.Month, 1)
|
||||
FechaF = DateTime.Now
|
||||
FechaI = New DateTime(NowADS().Year, NowADS().Month, 1)
|
||||
FechaF = NowADS()
|
||||
StrArreglo = New StringBuilder()
|
||||
CargaRutas()
|
||||
CargaDatos(CveDispositivo)
|
||||
@@ -302,7 +302,7 @@ Partial Class GPS_Vehiculos
|
||||
Else
|
||||
Dim POLYPATH = ""
|
||||
Dim lastCoord = ""
|
||||
If GPS.GetPosicionEquipo(CveDispositivo, DateTime.Today, DateTime.Now) Then
|
||||
If GPS.GetPosicionEquipo(CveDispositivo, DateTime.Today, NowADS()) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
For Each row As DataRow In GPS.DtResultados.Rows
|
||||
Dim Coord As String = SQLToGmaps(row("Posicion").ToString(), "POINT")
|
||||
@@ -1183,7 +1183,7 @@ Partial Class GPS_Vehiculos
|
||||
|
||||
'Cuerpo Modal
|
||||
DdlTIpoServicio.SelectedIndex = 0
|
||||
TxtFechaServicio.Text = Now.ToShortDateString
|
||||
TxtFechaServicio.Text = NowADS().ToShortDateString
|
||||
TxtProveedorS.Text = ""
|
||||
TxtImporteServicio.Text = ""
|
||||
'DdlCompra.DataBind()
|
||||
@@ -1327,7 +1327,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf DdlTipoConsultaLog.SelectedValue = "Today" Then
|
||||
If GPS.GetRepDispositivo(CveDispositivo, ($"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.GetRepDispositivo(CveDispositivo, ($"{NowADS().ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{NowADS().ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
GVLog.DataSource = GPS.DtResultados
|
||||
Else
|
||||
@@ -1335,7 +1335,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf DdlTipoConsultaLog.SelectedValue = "Yesterday" Then
|
||||
If GPS.GetRepDispositivo(CveDispositivo, ($"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.GetRepDispositivo(CveDispositivo, ($"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
GVLog.DataSource = GPS.DtResultados
|
||||
Else
|
||||
@@ -1343,7 +1343,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf DdlTipoConsultaLog.SelectedValue = "Week" Then
|
||||
If GPS.GetRepDispositivo(CveDispositivo, ($"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00").ToDateTime, DateTime.Now) Then
|
||||
If GPS.GetRepDispositivo(CveDispositivo, ($"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00").ToDateTime, NowADS()) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
GVLog.DataSource = GPS.DtResultados
|
||||
Else
|
||||
@@ -1376,7 +1376,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf DdlLogRespuestas.SelectedValue = "Today" Then
|
||||
If GPS.GetRespuestasDispositivo(CveDispositivo, ($"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.GetRespuestasDispositivo(CveDispositivo, ($"{NowADS().ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{NowADS().ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
GVRespuestas.DataSource = GPS.DtResultados
|
||||
Else
|
||||
@@ -1384,7 +1384,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf DdlLogRespuestas.SelectedValue = "Yesterday" Then
|
||||
If GPS.GetRespuestasDispositivo(CveDispositivo, ($"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.GetRespuestasDispositivo(CveDispositivo, ($"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
GVRespuestas.DataSource = GPS.DtResultados
|
||||
Else
|
||||
@@ -1392,7 +1392,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf DdlLogRespuestas.SelectedValue = "Week" Then
|
||||
If GPS.GetRespuestasDispositivo(CveDispositivo, ($"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00").ToDateTime, DateTime.Now) Then
|
||||
If GPS.GetRespuestasDispositivo(CveDispositivo, ($"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00").ToDateTime, NowADS()) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
GVRespuestas.DataSource = GPS.DtResultados
|
||||
Else
|
||||
@@ -1521,7 +1521,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf TipoConsulta = "Today" Then
|
||||
If ObjGPS.GetRepDispositivoCanBus(CveDispositivo, ($"{DateTime.Now.ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If ObjGPS.GetRepDispositivoCanBus(CveDispositivo, ($"{NowADS().ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{NowADS().ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
GvCanBus.DataSource = ObjGPS.DtResultados
|
||||
Else
|
||||
@@ -1529,7 +1529,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf TipoConsulta = "Yesterday" Then
|
||||
If ObjGPS.GetRepDispositivoCanBus(CveDispositivo, ($"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If ObjGPS.GetRepDispositivoCanBus(CveDispositivo, ($"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 0:00").ToDateTime, ($"{NowADS().AddDays(-1).ToString("dd/MM/yyyy")} 23:59").ToDateTime) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
GvCanBus.DataSource = ObjGPS.DtResultados
|
||||
Else
|
||||
@@ -1537,7 +1537,7 @@ Partial Class GPS_Vehiculos
|
||||
End If
|
||||
End If
|
||||
ElseIf TipoConsulta = "Week" Then
|
||||
If ObjGPS.GetRepDispositivoCanBus(CveDispositivo, ($"{DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy")} 0:00").ToDateTime, DateTime.Now) Then
|
||||
If ObjGPS.GetRepDispositivoCanBus(CveDispositivo, ($"{NowADS().AddDays(-7).ToString("dd/MM/yyyy")} 0:00").ToDateTime, NowADS()) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
GvCanBus.DataSource = ObjGPS.DtResultados
|
||||
Else
|
||||
@@ -1753,12 +1753,12 @@ Partial Class GPS_Vehiculos
|
||||
'Select Case Tipo
|
||||
' Case "GPRS"
|
||||
' If ObjHerra.EjecutarComandoManualGPRS(Comando, Telefono, CveDispositivo, -1) Then
|
||||
' LblFecha.Text = Now.ToString("dd/MM/yyyy")
|
||||
' LblFecha.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
' GuardaLog($"Se ejecuto el comando correctamente vía GPRS. ")
|
||||
' End If
|
||||
' Case "SMS"
|
||||
' If ObjHerra.EjecutarComandoManualSMS(Comando, Telefono, CveDispositivo, -1) Then
|
||||
' LblFecha.Text = Now.ToString("dd/MM/yyyy")
|
||||
' LblFecha.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
' GuardaLog($"Se ejecuto el comando correctamente vía SMS Fecha. ")
|
||||
' End If
|
||||
'End Select
|
||||
|
||||
@@ -311,7 +311,7 @@ public partial class GPS_WizardDispositivos : ClsPaginas
|
||||
}
|
||||
private string GenerarDevID()
|
||||
{
|
||||
long ticks = DateTime.Now.Ticks;
|
||||
long ticks = NowADS().Ticks;
|
||||
byte[] bytes = BitConverter.GetBytes(ticks);
|
||||
string id = Convert.ToBase64String(bytes)
|
||||
.Replace('+','A')
|
||||
|
||||
Reference in New Issue
Block a user