Example #1
0
 private void ButtonEditOrder_Click(object sender, RoutedEventArgs e)
 {
     invoiceRepository.DisplayInvoiceFromOrder(order.OrderID);
     if (invoiceRepository.DisplayInvoiceFromOrder(order.OrderID) == true)
     {
         WindowShowDialog wsd = new WindowShowDialog();
         wsd.LabelShowDialog.Content = "Der er allerede dannet en faktura på denne ordre!";
         wsd.ShowDialog();
     }
     else if (order != null)
     {
         WindowEditOrder weo = new WindowEditOrder(order);
         weo.ShowDialog();
         Update();
     }
     else
     {
         WindowShowDialog wsd = new WindowShowDialog();
         wsd.LabelShowDialog.Content = "Ingen ordre er valgt!";
         wsd.ShowDialog();
     }
 }