private void Button_Click(object sender, RoutedEventArgs e) { BankLogic.DepositMoney(MainPage.ChoosenAccount, double.Parse(sum.Text)); Transaction transnew = new Transaction(MainPage.ChoosenAccount.AccountNumber, DateTime.Now, double.Parse(sum.Text), MainPage.ChoosenAccount.Balance); sumValue.Text = sum.Text; sumValue.Visibility = Visibility.Visible; sumText.Visibility = Visibility.Visible; MainPage.ChoosenAccount.TransactionList.Add(transnew); this.Frame.Navigate(typeof(MainMeny)); //Thread.Sleep(2000); }
public void Deposite(int count) { var returnCount = bankLogic.DepositMoney(DepositeMoney.Key, count); if (returnCount <= 0) { RefreshAvailebleMoney(); _eventAggregator.PublishOnUIThread(new DepositeType(DepositeMoney.Key * count)); } else { RefreshAvailebleMoney(); var rightCount = count - returnCount; _eventAggregator.PublishOnUIThread(new DepositeType(rightCount)); MessageBox.Show($"Количество купюр достигла максимум \nВам вернули: {DepositeMoney.Key}, в количестве {returnCount}", "Ошибка");;; } }