Пример #1
0
 /// <summary>
 /// This will create a new invoice. It will not have any items on it initially.
 /// </summary>
 private void addInvoice_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         _logic.AddNewInvoice();
         invoicesDataGrid.Items.Refresh();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Unable to add invoice. " + ex.ToString(), "Error - addInvoice_Click",
                         MessageBoxButton.OK, MessageBoxImage.Exclamation);
     }
 }
Пример #2
0
 /// <summary>
 /// Takes the user seleted date and newOrders then calls AddNewInvoice.
 /// </summary>
 /// <param name="sender">CreateSubmitInvoiceButton</param>
 /// <param name="e"></param>
 private void CreateSubmitInvoiceButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         mainLogic.AddNewInvoice(CreateDateSelectionCalendar.SelectedDate.Value, newOrders);
         CreateItemQuantityTextBox.Text = "";
         CreateTotalPriceLabel.Content  = "Total: $0";
         newOrders.Clear();
         SetComboBoxes();
     }
     catch (Exception ex)
     {
         ExceptionHandler(ex);
         throw;
     }
 }