From bb21c55929d4465e4ab7d7a6bc479f158ab4ad40 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 25 Jun 2020 12:36:53 -0700 Subject: [PATCH 01/31] -- cambio de tipomovto, al costo, se carga en lugar de abono negativo --- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index fa0be78b9..9cb9ddc3a 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -940,7 +940,7 @@ Partial Class Inventarios_TraspasoAlmacen If dr IsNot Nothing Then IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=-importe) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then ErrorMovInv = True End If Contabilizable = False From e1c576f74a809323af4b0c6873661f3b78465aac Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 26 Jun 2020 17:21:44 -0700 Subject: [PATCH 02/31] =?UTF-8?q?se=20agrego=20el=20encodign=20utf-8=20a?= =?UTF-8?q?=20los=20correos=20de=20notificaci=C3=B3n=20a=20las=20entregas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/PopUpVerFactura.aspx.vb | 4 +++- General/PopUpPaqueteriasGuias.aspx.cs | 5 ++++- General/RepPaqueteriasGuias.aspx.cs | 5 ++++- Inventarios/EntregaAlmacen.aspx.vb | 9 +++++---- Inventarios/EntregasPorRealizar.aspx.cs | 5 ++++- Ventas/Ventas.aspx.vb | 2 +- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index eaf8dacca..3b343b278 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -936,7 +936,9 @@ Partial Class PopUpVerFactura Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString 'se rellena la sucursal 'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel) - Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) + Dim CveSubProyecto As Integer = dtVentas(0)("CveSubProyecto").ToString().ToEntero() + Vta.SubProyecto = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) + 'Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) Vta.Cliente = New Modelos.ClienteModel Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString diff --git a/General/PopUpPaqueteriasGuias.aspx.cs b/General/PopUpPaqueteriasGuias.aspx.cs index e6536dc3b..97e830f06 100644 --- a/General/PopUpPaqueteriasGuias.aspx.cs +++ b/General/PopUpPaqueteriasGuias.aspx.cs @@ -758,9 +758,12 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas StringBuilder strBody = new StringBuilder(); strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); strBody.Append(" "); strBody.Append("
"); - strBody.Append($""); + strBody.Append($""); strBody.Append("
"); strBody.Append("

"); strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino con el número de guía {Guia} y rastreo {Rastreo} de {Paqueteria}. Le confirmamos los productos que recibirá conforme a la {TipoDocto}:"); diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index 421f862af..2633ccd25 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -1102,9 +1102,12 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas StringBuilder strBody = new StringBuilder(); strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); strBody.Append(" "); strBody.Append("

"); - strBody.Append($""); + strBody.Append($""); strBody.Append("
"); strBody.Append("

"); strBody.Append($" Apreciable {ClienteNombre}, su pedido correspondiente a la {tipoDocto}:"); diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index c8a2bc967..6eb9ba7a5 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2665,10 +2665,8 @@ Partial Class Inventarios_EntregaAlmacen If CvePaqueteriaGuia > 0 Then If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then - If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then + If Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then ''manda correo - MandaCorreoEntrega(CveVentaSurtir) - Else ErrorMovInv = True End If End If @@ -3222,9 +3220,12 @@ Partial Class Inventarios_EntregaAlmacen Next strBody.Append("") + strBody.Append("") + strBody.Append("") + strBody.Append("") strBody.Append(" ") strBody.Append("

") - strBody.Append($"") + strBody.Append($"") strBody.Append("
") strBody.Append("

") strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los") diff --git a/Inventarios/EntregasPorRealizar.aspx.cs b/Inventarios/EntregasPorRealizar.aspx.cs index 46615ecb7..4a24c6f5a 100644 --- a/Inventarios/EntregasPorRealizar.aspx.cs +++ b/Inventarios/EntregasPorRealizar.aspx.cs @@ -148,9 +148,12 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas StringBuilder strBody = new StringBuilder(); strBody.Append(""); + strBody.Append(""); + strBody.Append(""); + strBody.Append(""); strBody.Append(" "); strBody.Append("

"); - strBody.Append($""); + strBody.Append($""); strBody.Append("
"); strBody.Append("

"); strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino. Le confirmamos los productos que recibirá conforme a la "); diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 49abae98b..583103124 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14490,7 +14490,7 @@ Partial Class Ventas DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString()) End If - TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") + 'TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") End Sub #End Region From 5b2a0685ffb44a3eb9ab219ecd259cd8989fdaac Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 26 Jun 2020 20:57:39 -0700 Subject: [PATCH 03/31] Clientes estados --- App_Code/ClsClientes.vb | 60 ++++++++++++++++++++++++++++++----------- Ventas/Clientes.aspx | 14 ++++++++++ Ventas/Clientes.aspx.vb | 20 ++++++++++++-- 3 files changed, 77 insertions(+), 17 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 4ed4b5dd5..3373f9526 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -166,6 +166,7 @@ Public Class ClsClientes Public Property CargoUsados As Boolean Public Property BonificacionUsado As Boolean + Public Property CveSATEstado As Integer Public ReadOnly Property DtResultados() As DataTable @@ -426,6 +427,7 @@ Public Class ClsClientes _RequiereOC = CBool(Data(0)("RequiereOC")) _CargoUsados = CBool(Data(0)("CargoUsado")) _BonificacionUsado = CBool(Data(0)("BonificacionUsado")) + _CveSATEstado = Data(0)("CveSATEstado").ToString.ToEntero End If Retorno = True @@ -574,7 +576,7 @@ Public Class ClsClientes Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, - Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1") As Boolean + Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -714,6 +716,9 @@ Public Class ClsClientes .Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras .Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen + .Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado + + End With Try SqlAdapter.Fill(Data) @@ -757,7 +762,8 @@ Public Class ClsClientes Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, - Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1") As Boolean + Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", + Optional CveSATEstado As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -911,6 +917,10 @@ Public Class ClsClientes .Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras .Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen + .Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado + + + End With Try SqlAdapter.Fill(Data) @@ -1011,21 +1021,41 @@ Public Class ClsClientes Return Retorno End Function - 'Public Function GetSucursales(CveCliente As Integer, CveClienteSucursal As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_Vta_SucursalClientePopUpGet") - ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente - ' SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try + Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean + Dim Retorno As Boolean = False - ' Return Retorno - 'End Function + DataAdapter("PA_ClientesEstadosGet") + + SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + + + 'Public Function GetSucursales(CveCliente As Integer, CveClienteSucursal As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' DataAdapter("PA_Vta_SucursalClientePopUpGet") + ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + ' SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try + + ' Return Retorno + 'End Function Public Function AddSucursal(CveCliente As Integer, Sucursal As String, CveUsuario As Integer, Ciudad As String, Colonia As String, CP As String, Direccion As String, Estado As String, Localidad As String, Pais As String, NoExt As String, NoInt As String, Telefono As String, Correo As String, CorreoCotizacion As String, Contacto As String, CveVendedor As Integer, NumCtaPago As String, CveMetodoPago As Integer, LimiteCredito As Decimal, CveResponsableSucursal As Integer, CveUsoCFDI As Integer, CveFormaPago33 As Integer, CveMetodoPago33 As Integer, Optional LT As String = "0", Optional LG As String = "0") As Boolean Dim Retorno As Boolean = False diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 09ea53ad9..6b4136efb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -429,6 +429,20 @@ + + + +

+ + + + + + +
+ + +
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 882f36ef2..e0ded8064 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -658,6 +658,7 @@ Partial Class Clientes End Property #End Region + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -975,7 +976,14 @@ Partial Class Clientes End If End If + + + If ObjCliente.GetEstados("-1") Then + DdlEstadoSAT.DataSource = ObjCliente.DtResultados.Copy + End If + ObjCliente.Dispose() + DdlSucursalCliente.DataBind() DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "0")) DdlSucursalCliente.Items.Insert(0, New ListItem("Todas", "-1")) @@ -988,6 +996,11 @@ Partial Class Clientes DdlClienteSucursalEnvio.DataBind() DdlClienteSucursalEnvio.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClienteSucursalEnvio.SelectedValue = "-1" + + DdlEstadoSAT.DataBind() + DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlEstadoSAT.SelectedValue = "-1" + End Sub Private Sub CargaGridRetenciones() Dim ObjClientes As New ClsClientes @@ -1511,6 +1524,9 @@ Partial Class Clientes DdlPais.SelectedValueExist(ObjClientes.CvePais) CargaEstado() + + DdlEstadoSAT.SelectedValueExist(ObjClientes.CveSATEstado) + If DdlPais.SelectedValue.Contiene("151", "66", "40") Then DdlEstado.Visible = True DdlEstado.SelectedValueExist(ObjClientes.CveEstado) @@ -2443,7 +2459,7 @@ Partial Class Clientes CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, - TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text) Then + TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then ViewState("CveCliente") = ObjClientes.CveCliente @@ -2538,7 +2554,7 @@ Partial Class Clientes CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), - RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text) Then + RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then ObjClientes.LimpiaImpuestosLocales(CveCliente) From 0614b2316194cf4d591fc2cf6c21034f91bc7cd7 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 26 Jun 2020 21:09:32 -0700 Subject: [PATCH 04/31] Web service GPS, Requiere agregar lo siguiente en el web.config: --- App_Code/ClsGPS.vb | 103 +++++++++ App_Code/ClsPaginas.vb | 1 + .../RCGPSService/RCService.disco | 4 + App_WebReferences/RCGPSService/RCService.wsdl | 59 +++++ App_WebReferences/RCGPSService/RCService.xsd | 21 ++ App_WebReferences/RCGPSService/RCService1.xsd | 57 +++++ App_WebReferences/RCGPSService/RCService2.xsd | 34 +++ App_WebReferences/RCGPSService/RCService3.xsd | 42 ++++ .../RCGPSService/Reference.svcmap | 35 +++ .../RCGPSService/configuration.svcinfo | 10 + .../RCGPSService/configuration91.svcinfo | 201 ++++++++++++++++++ Ashx/SIGGPSRCService.ashx | 162 ++++++++++++++ GPS/RecursoConfiableTracking.aspx | 153 +++++++++++++ GPS/RecursoConfiableTracking.aspx.vb | 119 +++++++++++ 14 files changed, 1001 insertions(+) create mode 100644 App_WebReferences/RCGPSService/RCService.disco create mode 100644 App_WebReferences/RCGPSService/RCService.wsdl create mode 100644 App_WebReferences/RCGPSService/RCService.xsd create mode 100644 App_WebReferences/RCGPSService/RCService1.xsd create mode 100644 App_WebReferences/RCGPSService/RCService2.xsd create mode 100644 App_WebReferences/RCGPSService/RCService3.xsd create mode 100644 App_WebReferences/RCGPSService/Reference.svcmap create mode 100644 App_WebReferences/RCGPSService/configuration.svcinfo create mode 100644 App_WebReferences/RCGPSService/configuration91.svcinfo create mode 100644 Ashx/SIGGPSRCService.ashx create mode 100644 GPS/RecursoConfiableTracking.aspx create mode 100644 GPS/RecursoConfiableTracking.aspx.vb diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index 1488d68ff..4f24d2b76 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -5365,6 +5365,109 @@ Public Class ClsGPS #End Region +#Region "R E C U R S O - C O N F I A B L E" + Public Function AddRCTracking(Nombre As String, CveDispositivo As Integer, Shipment As String, CveUsuarioIngreso As Integer, CveCliente As Integer, CveEmpresa As Integer) As Integer + Dim retorno As Integer = -1 + DataAdapter("PA_GPS_RC_TrackingAdd", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@Nombre", SqlDbType.VarChar).Value = Nombre + .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo + .Add("@Shipment", SqlDbType.VarChar).Value = Shipment + .Add("@CveUsuarioIngreso", SqlDbType.Int).Value = CveUsuarioIngreso + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveRCTracking", SqlDbType.Int).Direction = ParameterDirection.Output + End With + + Try + SqlAdapter.Fill(Data) + retorno = SqlAdapter.SelectCommand.Parameters("@CveRCTracking").Value.ToString.ToEntero + Catch ex As Exception + OnError("Ocurrió un error al agregar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function UpdateRCTrackingEstatus(CveRCTracking As Integer, CveEstatus As Boolean, CveUsuarioModifico As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_RC_TrackingEstatusUpdate", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking + .Add("@CveEstatus", SqlDbType.Bit).Value = CveEstatus + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function GetRCTracking(CveRCTracking As Integer, CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_RC_TrackingGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking + .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function GetRCTrackingDatos(CveRCTracking As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_RC_TrackingDatosGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los datos de un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function RemoveRCTracking(CveRCTracking As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_RC_TrackingEstatusRemove", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + +#End Region + Protected Sub addParameters(name As String, tipo As SqlDbType, valor As Object) If SqlConexion.State = ConnectionState.Open Then SqlAdapter.SelectCommand.Parameters.Add(name, tipo).Value = valor diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 66e6e4384..21eb83cd4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4372,6 +4372,7 @@ Public Class ClsPaginas PaginaDict.Add("/GPS/Notificaciones.aspx".ToUpper(), -1) PaginaDict.Add("/GPS/Shipments.aspx".ToUpper(), 673) PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685) + PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692) #End Region 'INVENTARIOS diff --git a/App_WebReferences/RCGPSService/RCService.disco b/App_WebReferences/RCGPSService/RCService.disco new file mode 100644 index 000000000..fc35eddd5 --- /dev/null +++ b/App_WebReferences/RCGPSService/RCService.disco @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/RCService.wsdl b/App_WebReferences/RCGPSService/RCService.wsdl new file mode 100644 index 000000000..e4de999c0 --- /dev/null +++ b/App_WebReferences/RCGPSService/RCService.wsdl @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/RCService.xsd b/App_WebReferences/RCGPSService/RCService.xsd new file mode 100644 index 000000000..999d861b1 --- /dev/null +++ b/App_WebReferences/RCGPSService/RCService.xsd @@ -0,0 +1,21 @@ + + + + + + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/RCService1.xsd b/App_WebReferences/RCGPSService/RCService1.xsd new file mode 100644 index 000000000..8e338436c --- /dev/null +++ b/App_WebReferences/RCGPSService/RCService1.xsd @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/RCService2.xsd b/App_WebReferences/RCGPSService/RCService2.xsd new file mode 100644 index 000000000..0108d9eb2 --- /dev/null +++ b/App_WebReferences/RCGPSService/RCService2.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/RCService3.xsd b/App_WebReferences/RCGPSService/RCService3.xsd new file mode 100644 index 000000000..32e1c19af --- /dev/null +++ b/App_WebReferences/RCGPSService/RCService3.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/Reference.svcmap b/App_WebReferences/RCGPSService/Reference.svcmap new file mode 100644 index 000000000..fbaf7a130 --- /dev/null +++ b/App_WebReferences/RCGPSService/Reference.svcmap @@ -0,0 +1,35 @@ + + + + false + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/configuration.svcinfo b/App_WebReferences/RCGPSService/configuration.svcinfo new file mode 100644 index 000000000..e70db96fc --- /dev/null +++ b/App_WebReferences/RCGPSService/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/RCGPSService/configuration91.svcinfo b/App_WebReferences/RCGPSService/configuration91.svcinfo new file mode 100644 index 000000000..74eb6fcf0 --- /dev/null +++ b/App_WebReferences/RCGPSService/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + BasicHttpBinding_IRCService + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc + + + + + + basicHttpBinding + + + BasicHttpBinding_IRCService + + + RCGPSService.IRCService + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + BasicHttpBinding_IRCService + + + + + + + + + + + \ No newline at end of file diff --git a/Ashx/SIGGPSRCService.ashx b/Ashx/SIGGPSRCService.ashx new file mode 100644 index 000000000..fdf23c18b --- /dev/null +++ b/Ashx/SIGGPSRCService.ashx @@ -0,0 +1,162 @@ +<%@ WebHandler Language="C#" Class="SIGGPSRCService" %> + +using System; +using System.Web; +using System.Web.SessionState; +using System.Data; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Extensiones; +using System.Collections.Specialized; +using System.Collections.Generic; +using System.IO; +using System.Net.Http; +using System.Text; + +public class SIGGPSRCService : IHttpHandler, IRequiresSessionState +{ + private Usuario ValidaUsuarioSistema(int CveEmpresa) + { + Usuario UsuarioActual = null; + ClsSisUsuarios ObjUsuarios = new ClsSisUsuarios(); + if (ObjUsuarios.GetUsuarios(1727)) + { + if (ObjUsuarios.DtResultados.Rows.Count > 0) + { + var Usuario = ObjUsuarios.DtResultados.Rows[0]["Usuario"].ToString(); + var Contrasenia = ObjUsuarios.DtResultados.Rows[0]["Contraseña"].ToString(); + + UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, ModExtensiones.IMEI, CveEmpresa); + + UsuarioActual.CveEmpresa = CveEmpresa; + UsuarioActual.CveCliente = 183798; + + CreaObjetoEmpresa(ref UsuarioActual); + CargaZonasHorarias(ref UsuarioActual); + } + } + ObjUsuarios.Dispose(); + return UsuarioActual; + } + private void CreaObjetoEmpresa(ref Usuario UsuarioActual) + { + ClsSisEmpresas ObjEmpresa = new ClsSisEmpresas(); + if (ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1")) + { + if (ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa)) + { + System.Data.DataTable dttmp = ObjEmpresa.DtResultados; + + var EmpresasFuncionalidades = new HybridDictionary(); + foreach (System.Data.DataRow Row in dttmp.Rows) + EmpresasFuncionalidades.Add(Convert.ToInt32(Row["CveFuncionalidad"]), Row["Valor"].ToString()); + + ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades); + } + + UsuarioActual.Empresa = ObjEmpresa.Empresa; + } + ObjEmpresa.Dispose(); + } + private void CargaZonasHorarias(ref Usuario UsuarioActual) + { + ClsClientes ObjClientes = new ClsClientes(); + try + { + if (ObjClientes.GetClientes(UsuarioActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus: 1)) + { + if (ObjClientes.DtResultados.Rows.Count == 1) + UsuarioActual.UTCOffset = ObjClientes.DtResultados.Rows[0]["UTCOffset"].ToString().ToEntero(); + } + } + catch (Exception ex) + { + ex.ToString().GuardaLog(); + } + finally + { + ObjClientes.Dispose(); + } + } + + public bool IsReusable => false; + + public void ProcessRequest(HttpContext context) + { + try + { + context.Response.ContentType = "application/json"; + IniciarTransmision(context); + } + catch (Exception ex) + { + ex.GuardaLog(ex.Message); + } + } + + private void IniciarTransmision(HttpContext context) + { + var UsuarioActual = ValidaUsuarioSistema(121); + + var WS = new RCGPSService.RCServiceClient(); + + RCGPSService.UserTokenResult Token = WS.GetUserToken(UserService, PasswordService); + List ListaEventos = new List(); + + DataTable DtTrackings = null; + var ObjGPS = new ClsGPS(); + try + { + if (ObjGPS.GetRCTracking(-1, -1, 1, -1, -1)) + { + DtTrackings = ObjGPS.DtResultados.Copy(); + } + + if (DtTrackings != null) + { + foreach (DataRow RowTrack in DtTrackings.Rows) + { + DataTable dtTracking = null; + if (ObjGPS.GetRCTrackingDatos(RowTrack["CveRCTracking"].ToString().ToEntero())) + { + dtTracking = ObjGPS.DtResultados.Copy(); + } + if (dtTracking != null) + { + foreach (DataRow Row in dtTracking.Rows) + { + ListaEventos.Add(new RCGPSService.Event() + { + code = "STT", + date = Row["Fecha"].ToString().ToDateTime(), + latitude = Row["Latitud"].ToString(), + longitude = Row["Longitud"].ToString(), + asset = Row["PlacasVehiculo"].ToString(), + speed = Row["Velocidad"].ToString(), + shipment = Row["Shipment"].ToString() + }); + } + } + dtTracking.Dispose(); + dtTracking = null; + } + } + } + catch (Exception ex) + { + this.OnError("Ocurrió un error al enviar los datos", ex); + } + ObjGPS.Dispose(); + DtTrackings.Dispose(); + DtTrackings = null; + + var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray()); + + WS.Close(); + context.Response.Write(JsonConvert.SerializeObject(respuesta)); + + } + + private string UserService => "demo_cedis_corp"; + private string PasswordService => "xxxxxxxx"; +} \ No newline at end of file diff --git a/GPS/RecursoConfiableTracking.aspx b/GPS/RecursoConfiableTracking.aspx new file mode 100644 index 000000000..2326002ed --- /dev/null +++ b/GPS/RecursoConfiableTracking.aspx @@ -0,0 +1,153 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RecursoConfiableTracking.aspx.vb" Inherits="GPS_RecursoConfiableTracking" %> + + + + + + + Recurso Confiable con Prestadores AVL + + + + + + +
  • + +
  • +
    +
    +
    + + + + + +
    +
    +
    + +
    +
    +
      +
    • Vehículo: + + +
    • +
    • Estatus: + + + + + +
    • +
    • Fecha Inicio: +
      + +
      +
    • +
    • Fecha Fin: +
      + +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + +
    + + + diff --git a/GPS/RecursoConfiableTracking.aspx.vb b/GPS/RecursoConfiableTracking.aspx.vb new file mode 100644 index 000000000..7faaaf405 --- /dev/null +++ b/GPS/RecursoConfiableTracking.aspx.vb @@ -0,0 +1,119 @@ +Option Strict On +Option Explicit On + +Imports System.Data +Imports System.IO +Imports System.Net +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json.Linq +Imports System.Linq +Imports System.Net.Http + +Partial Class GPS_RecursoConfiableTracking + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CargaDatos() + End If + End Sub + Private Sub CargaDatos() + CargaDispositivos() + CargaTracking() + End Sub + + Public Sub CargaDispositivos() + + DdlDispositivoFiltro.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario) + DdlDispositivoFiltro.DataBind() + DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1")) + + DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo <> ''") + DdlDispositivo.DataBind() + DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1")) + + UpAgregar.Update() + End Sub + Private Sub CargaTracking() + Dim FechaI As DateTime = If(IsDate(txtFechaI.Text), txtFechaI.Text.ToDateTime(), MinFecha) + Dim FechaF As DateTime = If(IsDate(txtFechaF.Text), txtFechaF.Text.ToDateTime(), MaxFecha) + + Dim ObjGPS As New ClsGPS + If ObjGPS.GetRCTracking(-1, DdlDispositivoFiltro.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveCliente, UsuarioActual.CveEmpresa, FechaI, FechaF) Then + GvDatos.DataSource = ObjGPS.DtResultados + End If + ObjGPS.Dispose() + GvDatos.DataBind() + UpDatos.Update() + End Sub + + Protected Sub LnkAgregarTracking_Click(sender As Object, e As EventArgs) + RegistraScript("$('#DivAgregar').modal('show');") + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaTracking() + End Sub + Protected Sub LnkCambiarEstatus_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Dim CveRCTracking As Integer = GvRow.DataKey("CveRCTracking").ToEntero() + Dim Estatus As Boolean = CBool(GvRow.DataKey("CveEstatus").ToEntero()) + + Dim ObjGPS As New ClsGPS + If ObjGPS.UpdateRCTrackingEstatus(CveRCTracking, Not Estatus, UsuarioActual.CveUsuario) Then + Alert("El tracking fue desactivado correctamente") + Else + Alert("Ocurrió un error al actualizar el estatus", TipoMensaje.MsgError) + End If + ObjGPS.Dispose() + + CargaDatos() + End Sub + Protected Sub GvDatos_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) + + End Sub + Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) + Dim Nombre As String = TxtNombre.Text.Trim() + Dim CveDispositivo As Integer = DdlDispositivo.SelectedValue.ToEntero() + Dim Shipment As String = TxtShipment.Text.Trim() + + Dim ObjGPS As New ClsGPS + Dim CveRCTracking As Integer = ObjGPS.AddRCTracking(Nombre, CveDispositivo, Shipment, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, UsuarioActual.CveEmpresa) + If CveRCTracking > 0 Then + Alert("El tracking fue agregado correctamente") + Else + Alert("Ocurrió un error el tracking", TipoMensaje.MsgError) + End If + ObjGPS.Dispose() + + CargaDatos() + RegistraScript("$('#DivAgregar').modal('hide');") + End Sub + + Protected Sub DdlDispositivo_SelectedIndexChanged(sender As Object, e As EventArgs) + Dim CveDispositivo As Integer = DdlDispositivo.SelectedValue.ToEntero() + + Dim RowDispositivo As DataRow = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltroPrimero($"CveDispositivo = {CveDispositivo}") + + If RowDispositivo IsNot Nothing Then + If String.IsNullOrEmpty(RowDispositivo("PlacasVehiculo").ToString()) Then + Alert("El vehiculo no tiene placas asignadas", TipoMensaje.MsgAdvertencia) + BtnAgregar.Enabled = False + Else + BtnAgregar.Enabled = True + End If + End If + UpAgregar.Update() + End Sub + Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("CveEstatus") = "1" Then + e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success" + ElseIf e.Row.DBCampo("CveEstatus") = "0" Then + e.Row.FCLabel("LblEstatus").CssClass = "badge badge-secondary" + End If + End If + End Sub +End Class From f2398ad2f911d95646358229973502b40f0e193d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 27 Jun 2020 19:07:14 -0700 Subject: [PATCH 05/31] Mensaje para aplicar nueva nota de credito --- Ventas/Ventas.aspx | 4 ++++ Ventas/Ventas.aspx.vb | 33 +++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index d6baf47b7..539f72842 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -5265,6 +5265,7 @@