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 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"))
|
||||
|
||||
|
||||
@@ -4747,7 +4747,7 @@ Partial Class Ventas
|
||||
End Function
|
||||
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
|
||||
Else
|
||||
Dim DTAlmacen As DataTable
|
||||
@@ -6340,6 +6340,10 @@ Partial Class Ventas
|
||||
e.Row.FCCheckBox("cbInv").Visible = False
|
||||
End If
|
||||
|
||||
If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.CveEmpresa = 141) Then
|
||||
e.Row.FCCheckBox("cbInv").Visible = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -15907,7 +15911,7 @@ Partial Class Ventas
|
||||
GvPS.DataBind()
|
||||
|
||||
'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")
|
||||
CargaGVInv(DtInv)
|
||||
End If
|
||||
@@ -24989,6 +24993,19 @@ Partial Class Ventas
|
||||
GvPS.Columns(17).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()
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
@@ -24999,13 +25016,8 @@ Partial Class Ventas
|
||||
UPCondicionesPago.Update()
|
||||
UpDetalle.Update()
|
||||
UpEstatus.Update()
|
||||
|
||||
CambiaTipoDocto()
|
||||
CambiaSucursalGeneral()
|
||||
CargaAnticipos(CveCliente)
|
||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||
BloqueaCondiconesPago()
|
||||
UpParametros.Update()
|
||||
UpINV.Update()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user