private void UpdateServicesTable() { var data = AppDB.GetServices(); servicesListView.Clear(); foreach (var service in data) { ListViewItem lvi = new ListViewItem(); lvi.Text = service.Label; lvi.SubItems.Add(service.Cost.ToString()); lvi.SubItems.Add(service.Id.ToString()); servicesListView.Items.Add(lvi); } }
private void LoadServices() { dbServices = AppDB.GetServices(); cartCb.Items.Clear(); cartCb.Items.AddRange(dbServices.Select(s => s.Label).ToArray()); }