Está en la página 1de 2

EMPRESA

NEW
Dim unchofer as new chofer
Unchofer.nombre = juan
Colchoferes.add (unchofer)
Dim unchofer as new chofer
Unchofer1.nombre = pepe
Colchoferes.add (unchofer)
Dim unviaje1 as new viaje
Dim inviaje2 as new viaje
Dim unviaje3 as new viaje
Dim uncamion1 as new camion
Dim uncamion2 as new camion
Uncamion1.mat 111
Uncamion1.chofer = unchofer
Unviaje1.fecha = 15/06/2004
Unviaje1.total $ = 100
Unviaje1.totalbultos = 5
Unviaje2.fecha = 16/06/2004
Unviaje2.total $ = 100
Unviaje2.totalbultos = 5
Unviaje3.fecha = 16/06/2004
Unviaje3.total$ = 100
Unviaje3.totalbultos = 5
Uncamion1.agregarviaje (unviaje1)
Uncamion1.agregarviaje (unviaje2)
Uncamion2.mat = 222
Uncamion2.agregarviaje (unviaje3)

Agregar chofer (unchofer) Lo agrego en la empresa.


Public sub agregarchofer (unchofer as chofer)
If buscarchofer (unchofer.nombre) is nothing
Colchoferes.add (unchofer)
End if
Public function dar choferes () as arraylist
Darchoferes = colchoferes
UICHOFERES
Privete mempresa as empresa
Public property empresa
Get
Empresa = mempresa
Set (valor)
Mempresa = valor
End property
CMDListar_Clic
Dim unchofer as chofer
Lstchoferes.items.clear
For each unchofer in mempresa.darchoferes()
Listbox.items.add (unchofer)
next

También podría gustarte