Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
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"))
|
||||||
|
|
||||||
|
|||||||
@@ -4747,7 +4747,7 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Sub CargarAlmacenes()
|
Private Sub CargarAlmacenes()
|
||||||
|
|
||||||
If CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot" Then
|
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||||
DivAlmacen.Visible = False
|
DivAlmacen.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim DTAlmacen As DataTable
|
Dim DTAlmacen As DataTable
|
||||||
@@ -6340,6 +6340,10 @@ Partial Class Ventas
|
|||||||
e.Row.FCCheckBox("cbInv").Visible = False
|
e.Row.FCCheckBox("cbInv").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.CveEmpresa = 141) Then
|
||||||
|
e.Row.FCCheckBox("cbInv").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -15907,7 +15911,7 @@ Partial Class Ventas
|
|||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
'RECARGA GV INVENTARIO
|
'RECARGA GV INVENTARIO
|
||||||
If Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot" Then
|
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
CargaGVInv(DtInv)
|
CargaGVInv(DtInv)
|
||||||
End If
|
End If
|
||||||
@@ -24989,6 +24993,19 @@ Partial Class Ventas
|
|||||||
GvPS.Columns(17).Visible = True
|
GvPS.Columns(17).Visible = True
|
||||||
GvPS.Columns(18).Visible = True
|
GvPS.Columns(18).Visible = True
|
||||||
|
|
||||||
|
CambiaTipoDocto()
|
||||||
|
CambiaSucursalGeneral()
|
||||||
|
CargaAnticipos(CveCliente)
|
||||||
|
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
TabAlmacen.Visible = True
|
||||||
|
DivAlmacen.Visible = True
|
||||||
|
CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
BloqueaCondiconesPago()
|
||||||
|
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
@@ -24999,13 +25016,8 @@ Partial Class Ventas
|
|||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
UpDetalle.Update()
|
UpDetalle.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
|
|
||||||
CambiaTipoDocto()
|
|
||||||
CambiaSucursalGeneral()
|
|
||||||
CargaAnticipos(CveCliente)
|
|
||||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
|
||||||
BloqueaCondiconesPago()
|
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
UpINV.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
Reference in New Issue
Block a user