From 98be4e248b62dd1cc30e07320e2b35e0812d0dca Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 29 Jun 2020 16:00:46 -0700 Subject: [PATCH 1/2] Datos de produccion , recurso confiable --- Ashx/SIGGPSRCService.ashx | 55 ++++++++++++++++++++++++---- GPS/RecursoConfiableTracking.aspx.vb | 2 +- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/Ashx/SIGGPSRCService.ashx b/Ashx/SIGGPSRCService.ashx index fdf23c18b..33e0b4b40 100644 --- a/Ashx/SIGGPSRCService.ashx +++ b/Ashx/SIGGPSRCService.ashx @@ -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"; + } \ No newline at end of file diff --git a/GPS/RecursoConfiableTracking.aspx.vb b/GPS/RecursoConfiableTracking.aspx.vb index 7faaaf405..f88665cbe 100644 --- a/GPS/RecursoConfiableTracking.aspx.vb +++ b/GPS/RecursoConfiableTracking.aspx.vb @@ -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")) From b6340b02e624211c55e726f7128f39e1cbe63bfc Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 29 Jun 2020 16:01:17 -0700 Subject: [PATCH 2/2] SALIDAS DE ALMACEN EN E141 (CREAR A PARTIR DE) --- Ventas/Ventas.aspx.vb | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 97560784d..cc1afcc10 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -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 @@ -15893,7 +15897,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 @@ -24975,6 +24979,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() @@ -24985,13 +25002,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