Automated teller machine emulation.
@using SergeyDrozdovATM.Web.Models
@model BalanceViewModel
@{
ViewBag.Title = "Balance";
}
<h2>@ViewBag.Title</h2>
<div class="row">
<div class="col-md-8">
@if (Model.NoAccounts)
{
<div>You have no any account.</div>
<hr />
<div>
@Html.ActionLink("Create Account", "CreateAccount", "ATM", null, new {@class = "btn btn-primary"})
@Html.ActionLink("Home", "Index", "Home", null, new { @class = "btn btn-default" })
</div>
}
else
{
<section id="loginForm">
<hr />
<table class="table table-striped">
<thead>
<tr>
<th>Account</th>
<th>Balance</th>
</tr>
</thead>
@foreach (var account in Model.AccountsList)
{
<tr>
<td>@account.Currency.Name</td>
<td>@account.Balance</td>
</tr>
}
</table>
<div>
@Html.ActionLink("Home", "Index", "Home", null, new { @class = "btn btn-default" })
</div>
</section>
}
</div>
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}