Automated teller machine emulation.
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using SergeyDrozdovATM.BLL;
namespace SergeyDrozdovATM.Web.Models
{
public class CreateAccountViewModel
{
public bool NoAvailableCurrencies { get; set; }
[Required]
public int CurrencyId { get; set; }
public SelectList CurrenciesList { get; set; }
}
public class CashTransferViewModel
{
[Display(Name = "Account")]
public int AccountId { get; set; }
public SelectList AccountsList { get; set; }
[Display(Name = "Cash Amount")]
public decimal CashAmount { get; set; }
public bool NoAccounts { get; set; }
}
//public class WithdrawViewModel
//{
// [Display(Name = "Account")]
// public int AccountId { get; set; }
// public SelectList AccountsList { get; set; }
// [Display(Name = "Cash Amount")]
// public decimal CashAmount { get; set; }
// public bool NoAccounts { get; set; }
//}
public class ConvertCurrencyViewModel
{
[Display(Name = "Source")]
public int SourceAccountId { get; set; }
[Display(Name = "Destination")]
public int DestinationAccountId { get; set; }
public SelectList SourceAccountsList { get; set; }
public SelectList DestinationAccountsList { get; set; }
[Display(Name = "Cash Amount")]
public decimal CashAmount { get; set; }
public bool NotEnoughAccounts { get; set; }
}
public class BalanceViewModel
{
public List<Account> AccountsList { get; set; }
public bool NoAccounts { get; set; }
}
}