private void printButton_Click(object sender, RoutedEventArgs e)
        {
            PrintDialog  printDlg = new PrintDialog();
            FlowDocument doc      = CreateFlowDocument();

            doc.Name = "FlowDoc";
            IDocumentPaginatorSource idpSource = doc;

            printDlg.PrintDocument(idpSource.DocumentPaginator, "Booking");
            BillingOperation Bo = new BillingOperation(bookingIdBlock.Text, customerNameBlock.Text, Convert.ToDateTime(bookingDateBlock.Text), tableNoBlock.Text, contactBlock.Text,
                                                       Convert.ToDouble(subTotal.Text), Convert.ToDouble(serviceTax.Text), Convert.ToDouble(vat.Text), Convert.ToDouble(discount.Text), Total);
            BillingService bs = new BillingService();

            bs.AddBilling(Bo);
            String Query = "truncate Table Orders";

            DataAccess.ExecuteQuery(Query);
            BookingService bookingService = new BookingService();

            bookingService.DeleteBooking(bookingIdBlock.Text);
            using (BookingReport BR = new BookingReport())
            {
                this.Close();
                BR.ShowDialog();
            }
        }
Example #2
0
 private void bookingReportButton_click(object sender, RoutedEventArgs e)
 {
     using (BookingReport bookingReport = new BookingReport())
     {
         bookingReport.ShowDialog();
     }
 }