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);
 }
Exemplo n.º 2
0
 public WalletDTO(Wallet wallet, ForeignExchangeDTO currencies)
 {
     this.Currency = wallet.Currency;
     this.Balance  = Math.Round(wallet.Balance * currencies.Rates[wallet.Currency.ToString()], 2);
 }