Datos de produccion , recurso confiable
This commit is contained in:
@@ -15,6 +15,17 @@ using System.Text;
|
||||
|
||||
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)
|
||||
{
|
||||
Usuario UsuarioActual = null;
|
||||
@@ -85,8 +96,28 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
||||
{
|
||||
try
|
||||
{
|
||||
context.Response.ContentType = "application/json";
|
||||
IniciarTransmision(context);
|
||||
context.Response.ContentType = "text/plain";
|
||||
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)
|
||||
{
|
||||
@@ -147,16 +178,26 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
||||
this.OnError("Ocurrió un error al enviar los datos", ex);
|
||||
}
|
||||
ObjGPS.Dispose();
|
||||
|
||||
DtTrackings.Dispose();
|
||||
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();
|
||||
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.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.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user