/// <summary> /// Loads all items in the items combo box /// </summary> private void LoadItems() { try { var items = sqlProvider.GetAllItems(); if (items != null) { cbAddItem.ItemsSource = sqlProvider.GetAllItems(); cbAddItem.DisplayMemberPath = "sItemDesc"; cbAddItem.SelectedValuePath = "sItemCode"; } else { throw new Exception("Failed to retrieve items from the database"); } } catch (Exception ex) { //This is the top level method so we want to handle the exception HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }