public WalletWithdrawForm(Wallet wallet, 
            List<Account> realAccounts,
            Account account, 
            bool deposit)
            : this()
        {
            this.wallet = wallet;
            this.account = account;
            this.realAccounts = realAccounts;

            Text = "Счет №" + account.ID;
            tabControl.SelectedTab = deposit ? tabPageDeposit : tabPageWithdraw;

            // вкладка Пополнить
            lblDepositWalletCurrency.Text = wallet.Currency;
            tbDepositAmount.Text = wallet.Balance.ToStringUniformMoneyFormat(true);
            lblAccountAmount.Text = account.Equity.ToStringUniformMoneyFormat(true) +
                " " + account.Currency;

            // вкладка Вывести
            tbWithdraw.Text = "0";
            lblWithdrawCurrency.Text = account.Currency;
            lblMargin.Text = account.UsedMargin.ToStringUniformMoneyFormat(true) + " " + account.Currency;
            lblAccountRemains.Text = account.Equity.ToStringUniformMoneyFormat(true) + " " + account.Currency;
        }
Esempio n. 2
0
 /// <summary>
 /// вывод средств в кошелек (скажем, ВебМани) пользователя
 /// </summary>        
 public abstract bool MakePayment(Wallet wallet, decimal amount, string targetPurse);
Esempio n. 3
0
 public override bool MakePayment(Wallet wallet, decimal amount, string targetPurse)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public static Wallet DecorateWallet(WALLET walInf)
 {
     var wallet = new Wallet
         {
             Balance = walInf.Balance,
             Currency = walInf.Currency,
             User = walInf.User,
             Password = walInf.Password
         };
     return wallet;
 }