Datos de produccion , recurso confiable
This commit is contained in:
@@ -15,6 +15,17 @@ using System.Text;
|
|||||||
|
|
||||||
public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
||||||
{
|
{
|
||||||
|
public bool EsProduccion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"] == null)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"].ToString() == "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Usuario ValidaUsuarioSistema(int CveEmpresa)
|
private Usuario ValidaUsuarioSistema(int CveEmpresa)
|
||||||
{
|
{
|
||||||
Usuario UsuarioActual = null;
|
Usuario UsuarioActual = null;
|
||||||
@@ -85,8 +96,28 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
context.Response.ContentType = "application/json";
|
context.Response.ContentType = "text/plain";
|
||||||
IniciarTransmision(context);
|
bool retorno = false;
|
||||||
|
string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"];
|
||||||
|
switch (Metodo)
|
||||||
|
{
|
||||||
|
case "EjecutaServicio":
|
||||||
|
ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogServicioConfiable");
|
||||||
|
IniciarTransmision(context);
|
||||||
|
retorno = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retorno)
|
||||||
|
{
|
||||||
|
context.Response.Write("True");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
context.Response.Write("False");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -147,16 +178,26 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
|||||||
this.OnError("Ocurrió un error al enviar los datos", ex);
|
this.OnError("Ocurrió un error al enviar los datos", ex);
|
||||||
}
|
}
|
||||||
ObjGPS.Dispose();
|
ObjGPS.Dispose();
|
||||||
|
|
||||||
DtTrackings.Dispose();
|
DtTrackings.Dispose();
|
||||||
DtTrackings = null;
|
DtTrackings = null;
|
||||||
|
|
||||||
var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
|
if (ListaEventos.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
|
||||||
|
context.Response.Write(JsonConvert.SerializeObject(respuesta));
|
||||||
|
}
|
||||||
|
|
||||||
WS.Close();
|
WS.Close();
|
||||||
context.Response.Write(JsonConvert.SerializeObject(respuesta));
|
//context.Response.Write(JsonConvert.SerializeObject(new { idJob = "1", exception = "" }));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string UserService => "demo_cedis_corp";
|
|
||||||
private string PasswordService => "xxxxxxxx";
|
|
||||||
|
|
||||||
|
|
||||||
|
private string UserService => EsProduccion ? "ws_avl_opsat" : "demo_cedis_corp";
|
||||||
|
private string PasswordService => EsProduccion ? "eiHv##889iWfz#&2" : "xxxxxxxx";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ Partial Class GPS_RecursoConfiableTracking
|
|||||||
DdlDispositivoFiltro.DataBind()
|
DdlDispositivoFiltro.DataBind()
|
||||||
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo <> ''")
|
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo IS NOT NULL AND PlacasVehiculo <> ''")
|
||||||
DdlDispositivo.DataBind()
|
DdlDispositivo.DataBind()
|
||||||
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user