public FrmMain() { InitializeComponent(); try { ClsVehicleBusiness.Retrieve(); } catch (Exception ex) { MessageBox.Show(ex.Message); }; }
private void btnClose_Click(object sender, EventArgs e) { try { ClsVehicleBusiness.Save(); } catch (Exception ex) { MessageBox.Show(ex.Message); } Close(); }
private void updateDisplay() { lblTotalCashflowAmount.Text = string.Format("{1:C}", ClsVehicleBusiness.VehicleList.Count, ClsVehicleBusiness.TotalCashflow()); lstLicencePlates.DataSource = null; lstLicencePlates.DataSource = ClsVehicleBusiness.VehicleList.Values.ToList <ClsVehicle>(); }