Ejemplo n.º 1
0
        private void btnAddVehicle_Click(object sender, EventArgs e)
        {
            Vehicle vehicle = new Vehicle();

            vehicle.registration    = tbox_addVehicle_registration.Text;
            vehicle.cargoSpace      = int.Parse(tbox_addVehicle_CarsoSpace.Text);
            vehicle.fuelConsumption = double.Parse(tbox_addVehicle_fuelConsumption.Text);
            vehicle.brand           = tbox_addVehicle_brand.Text;
            vehicle.model           = tbox_addVehicle_model.Text;

            DeliveryHolder.vehicles.Add(vehicle);
            DeliveryClient.InsertVehicle(vehicle);

            clearTab(tabPageVehicle);
            setupRouteCmb();
        }