private void CompleteButton_Click(object sender, RoutedEventArgs e) { InvoiceBuilder invoiceBuilder = new InvoiceBuilder(); mainViewModel.saveCustomerProfiles(); mainViewModel.saveInvoiceNumber(); if (invoiceBuilder.build(mainViewModel)) { Close(); } }