Automated teller machine emulation.
@using SergeyDrozdovATM.Web.Models
@model CashTransferViewModel
@{
ViewBag.Title = "Deposit";
}
<h2>@ViewBag.Title</h2>
<div class="row">
<div class="col-md-8">
@if (Model.NoAccounts)
{
<div>Please create an account.</div>
<hr />
<div>@Html.ActionLink("Create Account", "CreateAccount", "ATM", null, new { @class = "btn btn-primary" })</div>
}
else
{
<section id="loginForm">
@using (Html.BeginForm("Deposit", "ATM", null, FormMethod.Post, new {@class = "form-horizontal", role = "form"}))
{
@Html.AntiForgeryToken()
<hr/>
<div class="form-group">
@Html.LabelFor(m => m.AccountId, new {@class = "col-md-2 control-label"})
<div class="col-md-10">
@Html.DropDownListFor(m => m.AccountId, Model.AccountsList, 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">
<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")
}