コード例 #1
0
 public UserInfoDTO(User user, ForeignExchangeDTO currencies)
 {
     this.Balance  = Math.Round(user.Wallet.Balance * currencies.Rates[user.Wallet.Currency.ToString()], 2);
     this.Username = user.UserName;
     this.Currency = user.Wallet.Currency.ToString();
     this.UserId   = user.Id;
     this.Admin    = user.Role.Equals(UserRole.Administrator) || user.Role.Equals(UserRole.MasterAdministrator);
 }
コード例 #2
0
 public WalletDTO(Wallet wallet, ForeignExchangeDTO currencies)
 {
     this.Currency = wallet.Currency;
     this.Balance  = Math.Round(wallet.Balance * currencies.Rates[wallet.Currency.ToString()], 2);
 }