--Se implementó el enrutamiento hacia RepContratoDetalle
This commit is contained in:
@@ -1,8 +1,70 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
Inherits ClsPaginas
|
||||
Private Property CveContrato As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveContrato"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Contrato As DataTable
|
||||
Get
|
||||
Return CType(ViewState("Contrato"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("Contrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Request("CveContrato") Is Nothing Then
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
CveContrato = Request("CveContrato").ToEntero
|
||||
|
||||
If Not IsPostBack Then
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Tipo AF
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Contrato = ObjContratos.DtResultados
|
||||
Else
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
|
||||
|
||||
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
||||
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
||||
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
||||
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
||||
TxtObservaciones.Text = Contrato.Rows(0)("Observaciones").ToString
|
||||
TxtUbicacion.Text = Contrato.Rows(0)("Ubicacion").ToString
|
||||
TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString
|
||||
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
||||
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
|
||||
DdlTipoAF.SelectedValue = Contrato.Rows(0)("CveTipoAF").ToString
|
||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user