private void updateAllInvoices() { try{ allInvoices.Clear(); foreach (var invoice in controller.getAllInvoices()) { allInvoices.Add(invoice); } invoiceList.ItemsSource = allInvoices; } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }