Пример #1
0
        private void plateNumberCB_SelectedIndexChanged(object sender, EventArgs e)
        {
            plateNumber = plateNumberCB.Text.Trim();
            _vehicle.RetrieveVehicleInfo(plateNumberCB.Text);
            vehicleNameL.Text = _vehicle.Listing;

            partCB.Items.Clear();
            _maintenances = _maintenance.RetrieveMaintenancePart(plateNumber);
            foreach (Maintenance m in _maintenances)
            {
                _part = _part.RetrievePartInfo(m.PartID);
                partCB.Items.Add(_part.Description);
            }
        }
        private void MaintenanceListLoad(string plateNumber)
        {
            maintenanceLV.Items.Clear();
            _maintenances = _maintenance.RetrieveMaintenancePart(plateNumber);
            foreach (Maintenance m in _maintenances)
            {
                _maintenanceID = m.MaintenanceID;
                _plateNumber   = m.PlateNumber;
                _partID        = m.PartID;
                _status        = m.Status;

                ListViewItem maintenanceList = new ListViewItem(_maintenanceID.ToString());
                maintenanceList.SubItems.Add(_part.RetrievePartInfo(_partID).Description);
                maintenanceList.SubItems.Add(_status);

                maintenanceLV.Items.Add(maintenanceList);
            }
        }