Example #1
0
        public void CreateTruck(string model, string colour, double price, string state)
        {
            Truck Truck = new Truck();
            Truck.Colour = colour;
            Truck.Model = model;

            if (state == "Commission")
                Truck.State = VehicleState.Commission;
            else if (state == "Leased")
                Truck.State = VehicleState.Leased;
            else if (state == "Sold")
                Truck.State = VehicleState.Sold;
            else Truck.State = VehicleState.Sold;
            trucklist.Add(Truck);
            //database.AddToTruckList(Truck);
        }
Example #2
0
 public void MakeContractLease(Truck v, CustomerBusiness c, DateTime dstart, DateTime dstop)
 {
     ContractLeasing Lease = new ContractLeasing();
     Lease.Truck = v;
     Lease.Customer = c;
     Lease.RentStart = dstart;
     Lease.RentStop = dstop;
     //Implement foundation.saveContractLease with Contract lloloooloololollolololololololol
 }
Example #3
0
 static void Main(string[] args)
 {
     Truck truck1 = new Truck();
     truck1.Model = "Scania Hallower";
     truck1.Colour = "Dark Blue";
     truck1.Price = 800;
     truck1.State = VehicleState.Leased;
     trucklist.Add(truck1);
     Car car1 = new Car();
     car1.Model = "Tesla Shadowrider";
     car1.Colour = "Black";
     car1.Price = 80000;
     car1.State = VehicleState.Commission;
     carlist.Add(car1);
 }