Automated teller machine emulation.
@using SergeyDrozdovATM.Web.Models
@model ConvertCurrencyViewModel
@{
ViewBag.Title = "Convert Currency";
}
<h2>@ViewBag.Title</h2>
<div class="row">
<div class="col-md-8">
@if (Model.NotEnoughAccounts)
{
<div>Please create more accounts.</div>
<hr />
<div>@Html.ActionLink("Create Account", "CreateAccount", "ATM", null, new { @class = "btn btn-primary" })</div>
}
else
{
<section id="loginForm">
@using (Html.BeginForm("ConvertCurrency", "ATM", null, FormMethod.Post, new {@class = "form-horizontal", role = "form"}))
{
@Html.AntiForgeryToken()
<hr/>
<div class="form-group">
@Html.LabelFor(m => m.SourceAccountId, new {@class = "col-md-2 control-label"})
<div class="col-md-10">
@Html.DropDownListFor(m => m.SourceAccountId, Model.SourceAccountsList, new {@class = "col-md-2 form-control"})
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.CashAmount, new {@class = "col-md-2 control-label"})
<div class="col-md-10">
@Html.TextBoxFor(m => m.CashAmount, new {@class = "form-control"})
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.DestinationAccountId, new {@class = "col-md-2 control-label"})
<div class="col-md-10">
@Html.DropDownListFor(m => m.DestinationAccountId, Model.DestinationAccountsList, new {@class = "col-md-2 form-control"})
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Complete" class="btn btn-primary"/>
@Html.ActionLink("Cancel", "Index", "Home", null, new { @class = "btn btn-default" })
</div>
</div>
}
</section>
}
</div>
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}