Commit inicial Ventas Productivo
This commit is contained in:
71
GPS/ConfiguradorVehiculos.aspx.vb
Normal file
71
GPS/ConfiguradorVehiculos.aspx.vb
Normal file
@@ -0,0 +1,71 @@
|
||||
Imports Extensiones
|
||||
Partial Class GPS_ConfiguradorVehiculos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property CveDispositivo As Integer
|
||||
Get
|
||||
Return ViewState("CveDispositivo").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveDispositivo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDispositivos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDispositivos()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1 ")
|
||||
GvDispositivos.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDispositivos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDispositivos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.VerticalAlign = VerticalAlign.Middle
|
||||
If e.Row.DBCampo("Estatus").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
||||
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If CBool(e.Row.DataKey("LimiteVelocidad").ToString) = False Then
|
||||
e.Row.FCLabel("LblLimiteVelocidad").Text = "No Aplica"
|
||||
Else
|
||||
e.Row.FCLabel("LblLimiteVelocidad").Text = e.Row.DBCampo("VelocidadMaxima")
|
||||
End If
|
||||
e.Row.FCHyperLink("ImgE").NavigateUrl = $"/GPS/Vehiculos.aspx?CveDispositivo={e.Row.DataKey("CveDispositivo").ToString}&ATI=7"
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub chkLimiteVelocidad_CheckedChanged(sender As Object, e As EventArgs) Handles chkLimiteVelocidad.CheckedChanged
|
||||
dvVelocidad.Visible = chkLimiteVelocidad.Checked
|
||||
UpBodyTipoEquipo.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
'Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs)
|
||||
' Dim gps As New ClsGPS
|
||||
' If gps.DispositivosUpdatePorCliente(CveDispositivo, TxtModeloVehiculo.Text, TxtAñoVehiculo.Text, "", TxtPlacas.Text, chkLimiteVelocidad.Checked, If(chkLimiteVelocidad.Checked, TxtLimiteVelocidad.Text.ToDouble, 0),
|
||||
' TxtDetallesVehiculo.Text, TxtRendimientoVehiculo.Text.ToDouble, "", "", TxtNombreVehiculo.Text, TxtNumeroEconomico.Text) Then
|
||||
' Alert("La configuración del vehículo se actualizó correctamente")
|
||||
' End If
|
||||
' gps.Dispose()
|
||||
' CargaGlobal()
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaGlobal()
|
||||
Dim gps As New ClsGPS
|
||||
If gps.DispositivosGet(-1, -1, -1) Then
|
||||
GlobalDTDispositivos(-1) = gps.DtResultados
|
||||
Else
|
||||
Application("GlobalDTDispositivos") = Nothing
|
||||
End If
|
||||
gps.Dispose()
|
||||
CargaDispositivos()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user