private void buttonRead_Click(object sender, RoutedEventArgs e) { try { SwitchButtons(); collection = orderBUS.GetOrders(); Sum = orderBUS.GetSum(collection); prodList.ItemsSource = collection; LeastSum.Text += " " + Sum; } catch (Exception exeption) { MessagesLabel.Background = new SolidColorBrush(Color.FromRgb(255, 26, 26)); Messages.Text = exeption.Message; } }