Beispiel #1
0
        private void ConfirmOweButton_Click(object sender, RoutedEventArgs e)
        {
            if (Utility.TextHasNoData(this.CompanyBox) || Utility.TextHasNoData(this.HowMuchTextBox) ||
                Utility.TextHasNoData(this.WhyMoneyOwedTextBox) || Customer == null)
            {
                MessageBox.Show("Input all fields");
                return;
            }

            // Create the finance and upload it
            Finance finance = new Finance
            {
                FinanceCustomer    = Customer,
                FinanceOwe         = HowMuchTextBox.Text,
                FinanceDescription = WhyMoneyOwedTextBox.Text
            };

            FinanceManager.AddFinance(finance);
            (new MainWindow()).Show();
            this.Close();
        }