示例#1
0
        //Tworzenie nowego konta.
        private void button_Click(object sender, RoutedEventArgs e)
        {
            account acc_add = new account();

            acc_add.acc_nr        = int.Parse(acc_nr_text.Text);
            acc_add.owner         = owner_text.Text;
            acc_add.currency      = combo_curr.Text;
            acc_add.interest_type = double.Parse(interest_text.Text);
            acc_add.balance       = Math.Round(double.Parse(balance_text.Text), 2);

            mw.account_list.Add(acc_add);
            mw.save_acc_list();

            MessageBox.Show("Stworzono konto o numerze: " + acc_add.acc_nr + "\nWłaściciel: " + acc_add.owner);
            this.Close();
        }