Пример #1
0
        private void btnAddVehicle_Click(object sender, EventArgs e)
        {
            InsuranceVehicle newInsuranceVehicle = new InsuranceVehicle();

            newInsuranceVehicle.VehicleId   = (lbxVehicleHistory.SelectedItem as Vehicle).Id;
            newInsuranceVehicle.insuranceid = currentInsurance.id;
            customerForm.allInsuranceVehicles.Add(newInsuranceVehicle);
            customerForm.BindInsuranceVehiclesToForm();
            customerForm.Refresh();
            this.Close();
        }