@model FHT.Agency.UI.InputModels.TransferInputModel @using FHT.Utilities @using FHT.Agency.CommonTypes @{ ViewBag.Title = "提交转账申请"; Layout = "~/Views/Shared/_Layout.cshtml"; var transferType = EnumHelpers.Enum2Dictionary().ToList(); } @section styles{ @Styles.Render("~/Content/select2") } @using (Html.BeginForm("MakeTransfer", "Transfer", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() @Html.ValidationSummary(false, "", new { @class = "text-danger" }) @Html.HiddenFor(m => m.TransferId)
@Html.RequiredLabelFor(m => m.AgentOrganizationId)
@Html.TextBoxFor(m => m.AgentOrganizationId, new { @class = "form-autocomplate", data_autocomplate_url = "/ManageAgent/SearchAgents" }) @Html.ValidationMessageFor(m => m.AgentOrganizationId)
@Html.RequiredLabelFor(m => m.TransferType) @{ var radioIndex = 0;
foreach (var tt in transferType) { radioIndex++;
@{ @*定义一个id 解决label的for属性与单选按钮的对应问题*@ string fileldId = "RoleRadio" + radioIndex; string id = ViewData.TemplateInfo.GetFullHtmlFieldId(fileldId); } @*, new { @checked = (Model.TransferId.HasValue? tt.Key == Model.TransferType ? "checked" : "": tt.Key== TransferType.Recharge?"checked":"") *@ @Html.RadioButtonFor(m => m.TransferType, tt.Key.ToInt(), tt.Key == Model.TransferType ? new { @checked = "checked" } as object : new { } as object) @Html.LabelFor(m => m.TransferType, tt.Value, new { @for = id, data_show_star = "false", style = "padding-left:5px" })
} } @Html.ValidationMessageFor(m => m.TransferType)
@Html.RequiredLabelFor(m => m.Amount)
@Html.TextBoxFor(m => m.Amount, new { @class = "form-control" }) @Html.ValidationMessageFor(m => m.Amount)
@Html.RequiredLabelFor(m => m.TransferTime)
@Html.TextBoxFor(m => m.TransferTime, new { @class = "form-control datepicker" }) @Html.ValidationMessageFor(m => m.TransferTime)
} @section scripts{ @Scripts.Render("~/bundles/select2") @Scripts.Render("~/bundles/views/makeTransfer") }