@using FHT.Agency.CommonTypes @using FHT.Utilities @model FHT.Agency.UI.InputModels.CreateAccountInputModel @{ ViewBag.Title = "新增用户"; var fhtUserRoleTypes = EnumHelpers.Enum2Dictionary().OrderBy(m => m.Key); var userRoleTypes = fhtUserRoleTypes.Where(r => !new[] { FhtUserRoleType.AgentAdmin, FhtUserRoleType.AgentCustomerServiceStaff, FhtUserRoleType.Administrator, FhtUserRoleType.RegionalChannelMananger, FhtUserRoleType.ChannelManager }.Contains(r.Key)).Select(r => new SelectListItem { Value = r.Key.ToInt().ToString(), Text = r.Value, }); } @using (Html.BeginForm("CreateUser", "Authorization", null, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() @Html.ValidationSummary(false, "", new { @class = "text-danger" })
@Html.RequiredLabelFor(m => m.Role, new { @class = "col-md-2 control-label" })
@Html.DropDownListFor(m => m.Role, userRoleTypes, new { @class = "form-control select2 " }) @Html.ValidationMessageFor(m => m.Role)
@Html.RequiredLabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.UserName) @Html.ValidationMessageFor(m => m.UserName)
@Html.RequiredLabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Password) @Html.ValidationMessageFor(m => m.Password)
@Html.RequiredLabelFor(m => m.DescriptiveName, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.DescriptiveName) @Html.ValidationMessageFor(m => m.DescriptiveName)
@Html.RequiredLabelFor(m => m.Mobile, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Mobile) @Html.ValidationMessageFor(m => m.Mobile)
@Html.RequiredLabelFor(m => m.Telephone, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Telephone) @Html.ValidationMessageFor(m => m.Telephone)
@*
@Html.RequiredLabelFor(m => m.LockoutStatus)
@Html.EditorFor(m => m.LockoutStatus) @Html.ValidationMessageFor(m => m.LockoutStatus)
*@ }