-- option strict on

This commit is contained in:
2023-08-23 00:03:35 -07:00
parent a9e785216f
commit 407256f079
13 changed files with 66 additions and 77 deletions

View File

@@ -211,7 +211,7 @@ Partial Class Acarreos_CatChoferes
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveChofer")
UpDatos.Update()
If ObjAcar.RemoveChofer(HdnID.Value, UsuarioActual.CveEmpresa) Then
If ObjAcar.RemoveChofer(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
Else
@@ -223,7 +223,7 @@ Partial Class Acarreos_CatChoferes
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then
If e.Row.DBCampo("Estatus") = "True" Then
e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
@@ -247,9 +247,9 @@ Partial Class Acarreos_CatChoferes
DdlMunicipio.Items.Clear()
If DdlEstado.SelectedValue > 0 Then
If DdlEstado.SelectedValue.ToEntero > 0 Then
DdlMunicipio.DataSource = GlobalDTGralMunicipios("-1", CveEstado:=DdlEstado.SelectedValue)
DdlMunicipio.DataSource = GlobalDTGralMunicipios("-1", CveEstado:=DdlEstado.SelectedValue.ToEntero)
DdlMunicipio.DataBind()
End If
@@ -271,11 +271,10 @@ Partial Class Acarreos_CatChoferes
DdlLocalidad.Items.Clear()
DdlColonia.Items.Clear()
If DdlMunicipio.SelectedValue > 0 Then
If DdlMunicipio.SelectedValue.ToEntero > 0 Then
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
DdlLocalidad.DataBind()
DdlColonia.DataSource = GlobalDTGralColonias("-1", "-1", "-1", DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=If(TxtCP.Text.Trim.Length > 0, TxtCP.Text.ToEntero, -1))
DdlColonia.DataBind()
@@ -283,27 +282,18 @@ Partial Class Acarreos_CatChoferes
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
DdlLocalidad.SelectedValueExist(-1)
DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
DdlColonia.SelectedValueExist(-1)
UpAddChofer.Update()
End Sub
Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs)
If DdlColonia.SelectedValue.ToEntero > 0 Then
validaCodigoPostal()
End If
End Sub
Private Sub validaCodigoPostal()
Dim CPTxt As Integer = TxtCP.Text.ToEntero()