@using FHT.Utilities @model FHT.Agency.UI.InputModels.UpdateUserInputModel @{ ViewBag.Title = "修改渠道用户账户"; ViewBag.Name = "修改成员"; Layout = "~/Views/Shared/_Layout.cshtml"; } @using (Html.BeginForm("UpdateChannelUser", "Authorization", null, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() @Html.ValidationSummary(false, "", new { @class = "text-danger" }) @Html.HiddenFor(m => m.UserId)
@Html.RequiredLabelFor(m => m.Role, new { @class = "col-md-2 control-label" })
@{ var roles = ((IEnumerable)ViewBag.Roles).ToList(); roles.Insert(0, new SelectListItem { Text = "选择用户角色", Disabled = true, }); } @Html.DropDownList("Role", roles, new { @class = "form-control select2 ", style = "width:200px;padding-left:10px;" })
@Html.CascadingDropDownListFor( expression: m => m.ParentId, triggeredByProperty: m => m.Role, //Parent property that trigers dropdown data loading url: Url.Action("GetUsersOfRole", "Authorization"), //Url of action that returns dropdown data parentIdParameterName: "role", //Parameter name for the selected parent value that url action receives optionLabel: "所属上级", // Option label disabledWhenParentNotSelected: false, //If true, disables dropdown until parrent dropdown selected htmlAttributes: new { @class = "form-control select2 ", style = "width:400px;padding-left:10px;"}) @Html.ValidationMessageFor(e => e.ParentId)
@Html.RequiredLabelFor(m => m.DescriptiveName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.DescriptiveName, new { @class = "col-md-4 form-control" }) @Html.ValidationMessageFor(m => m.DescriptiveName)
@Html.RequiredLabelFor(m => m.Mobile, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Mobile, new { @class = "col-md-4 form-control" }) @Html.ValidationMessageFor(m => m.Mobile)
@Html.RequiredLabelFor(m => m.Telephone, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.Telephone, new { @class = "col-md-4 form-control" }) @Html.ValidationMessageFor(m => m.Telephone)
@Html.RequiredLabelFor(m => m.LockoutStatus, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.LockoutStatus) @Html.ValidationMessageFor(m => m.LockoutStatus)
}