--Se hicieron los cambios para poder modificar los viajes
This commit is contained in:
@@ -6,6 +6,16 @@ Imports Extensiones.ModExtensiones
|
|||||||
Partial Class ListadoViajes
|
Partial Class ListadoViajes
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
#Region "Propiedades"
|
||||||
|
Private Property CveViaje As String
|
||||||
|
Get
|
||||||
|
Return ViewState("CveViaje").ToString()
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("CveViaje") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
#End Region
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
@@ -155,11 +165,11 @@ Partial Class ListadoViajes
|
|||||||
DdlDestino.SelectedValue = ""
|
DdlDestino.SelectedValue = ""
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim id As Integer = Convert.ToInt32(Request.QueryString("CveViaje"))
|
|
||||||
|
|
||||||
If ObjTransportes.UpdateViajes(id, DdlRutas.Text.ToEntero, DdlTransporte.Text.ToEntero, DdlChofer.Text.ToEntero, UsuarioActual.CveEmpresa, TxtFechaViaje.Text.ToDate, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero) = True Then
|
If ObjTransportes.UpdateViajes(CveViaje.ToEntero, DdlRutas.Text.ToEntero, DdlTransporte.Text.ToEntero, DdlChofer.Text.ToEntero, UsuarioActual.CveEmpresa, TxtFechaViaje.Text.ToDate, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero) = True Then
|
||||||
Alert("El viaje se modificó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El viaje se modificó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ObjTransportes.Commit()
|
ObjTransportes.Commit()
|
||||||
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -181,6 +191,8 @@ Partial Class ListadoViajes
|
|||||||
DdlDestino.SelectedValue = GvRow.DataKey("CveDestino")
|
DdlDestino.SelectedValue = GvRow.DataKey("CveDestino")
|
||||||
DdlPartida.SelectedValue = GvRow.DataKey("CvePartida")
|
DdlPartida.SelectedValue = GvRow.DataKey("CvePartida")
|
||||||
DdlChofer.SelectedValue = GvRow.DataKey("CvePersonal")
|
DdlChofer.SelectedValue = GvRow.DataKey("CvePersonal")
|
||||||
|
ViewState("CveViaje") = GvRow.DataKey("CveViaje")
|
||||||
|
Page.Response.Write("<script>console.log('El resultado de tu variable" + CveViaje + "')</script>")
|
||||||
Dim fecha As DateTime
|
Dim fecha As DateTime
|
||||||
|
|
||||||
If DateTime.TryParse(GvRow.DataKey("Fecha").ToString, fecha) Then
|
If DateTime.TryParse(GvRow.DataKey("Fecha").ToString, fecha) Then
|
||||||
|
|||||||
Reference in New Issue
Block a user