123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- @using Hospital.Core.Dict
- @model Hospital.Model.Models.Q_Roles
- @{
- ViewBag.Title = "修改角色";
- }
- @section head
- {
- @Styles.Render("~/Content/css/select2")
- }
- <div class="page-header">
- <h3>
- @if (ViewBag.Logo != null)
- {
- <img src="@ViewBag.Logo" id="logoImg" style="margin:0px 5px 5px 0px;" />
- }
- <i class="fa fa-sitemap"></i> @ViewBag.Title
- <a href="@Url.Action("Index", "Roles")" class='backbutton'><i class="icon-white fa fa-arrow-circle-left"></i>返回</a>
- </h3>
- </div>
- @using (Html.BeginForm("Edit", "Roles", new { @returnUrl = Request.QueryString["returnUrl"] }, FormMethod.Post, new { name = "myform", id = "myform" }))
- {
- <div class="form-horizontal">
- <div class="control-group">
- @Html.LabelFor(m => m.RolesName, new { @class = "control-label", @style = "width:100px;" })
- <div class="controls" style="margin-left:10px;">
- @Html.TextBoxFor(m => m.RolesName, new { @class = "span2", @style = "width:350px;" })
- @Html.ValidationMessageFor(m => m.RolesName)
- </div>
- </div>
- <div class="control-group">
- @Html.LabelFor(m => m.RolesDescription, new { @class = "control-label", @style = "width:100px;" })
- <div class="controls" style="margin-left:10px;">
- @Html.TextBoxFor(m => m.RolesDescription, new { @class = "span2", @style = "width:350px;" })
- </div>
- </div>
- <div class="control-group">
- @Html.LabelFor(m => m.QuanxianChar, new { @class = "control-label", @style = "width:100px;" })
- <div class="controls" style="margin-left:10px;">
- @Html.ListBoxFor(m => m.QuanxianChar, Hospital.Controllers.RolesController.GetAllStaticQuanxianList(), new { @style = "width:365px;" })
- <span id="quanxianValidateMessage" style="color:red;"></span>
- </div>
- </div>
- </div>
- }
- <div class="form-actions">
- <div style="margin-left:100px;">
- <button type="submit" class="btn btn-primary btnSubmit">提交</button>
- <a href="@Url.Action("Index")" class="btn">返回</a>
- </div>
- </div>
- @section scripts{
- @Scripts.Render("~/bundles/jquery/multiselect")
- <script type="text/javascript">
- $("#QuanxianChar").multiselect();
- $(".btnSubmit").click(function () {
- $("#quanxianValidateMessage").empty();
- if ($("#QuanxianChar").val() == null) {
- $("#quanxianValidateMessage").append("请选择");
- } else {
- $("#myform").submit();
- }
- });
- </script>
- }
|