private void listBoxFleetList_SelectedIndexChanged(object sender, EventArgs e)
        {
            string     vehicleRegNo = listBoxFleetList.SelectedItem.ToString();
            ClsVehicle lcVehicle    = ClsRentVehicleFleet.FleetList[vehicleRegNo];

            richTextBoxQuickView.Text = lcVehicle.GetQuickView();
        }
        private void EditVehicle()
        {
            String     vehicleRegNo = listBoxFleetList.SelectedItem.ToString();
            ClsVehicle lcVehicle    = ClsRentVehicleFleet.FleetList[vehicleRegNo];

            lcVehicle.ViewEditVehicle();
            UpdateVehicleFleetList();
        }
Esempio n. 3
0
 public void ShowDialog(ClsVehicle prVehicle)
 {
     _LcVehicle = prVehicle;
     LoadComboBoxValues();
     SetAllDefaultSettings();
     LoadActivityList(comboBoxSortBy.Text);
     ShowDialog();
 }
        private void AddVehicle()
        {
            ClsVehicle lcVehicle = new ClsVehicle();

            if (lcVehicle != null && lcVehicle.ViewEditVehicle())
            {
                ClsRentVehicleFleet.FleetList.Add(lcVehicle.RegistrationNumber, lcVehicle);
                UpdateVehicleFleetList();
            }
        }
 public bool ShowDialog(ClsVehicle prVehicle)
 {
     _LcVehicle = prVehicle;
     UpdateFormData();
     return(ShowDialog() == DialogResult.OK);
 }