@model EMIS.ViewModel.SystemView.DictionaryItemView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEdit = (Request["DictionaryItemID"] ?? "") == "" || Request["isCodeAdd"] == "1"; var isEditable = Model.IsEditable; //字典类型 ComboGridOptions cgopDictionary = new ComboGridOptions { TextField = "DictionaryName", ValueField = "DictionaryCode", ID = "DictionaryDropdown", Name = "DictionaryDropdown", IsEnabled = isEdit, GridOptions = new DataGridOptions { Columns = new List() { //new BoundFieldColumn { FieldName="DictionaryCode",HeaderText="类型代码", Align=AlignStyle.Center, Width=0.2 }, new BoundFieldColumn { FieldName="DictionaryName",HeaderText="类型名称", Align=AlignStyle.Center, Width=0.12 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Dictionary/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@*数据字典信息*@
@if (ViewBag.Type != "1")//控制列表进入、屏蔽按钮权限 { @Html.ContextMenuBar("Edit") }
@Html.HiddenFor(x => x.DictionaryItemID)
@Html.LabelFor(x => x.DictionaryName): @Html.ComboGridFor(x => x.DictionaryCode, cgopDictionary) @Html.LabelFor(x => x.OrderNo): @Html.TextBoxFor(x => x.OrderNo)
@Html.LabelFor(x => x.Code): @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEdit }) @Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name)
@Html.LabelFor(x => x.Value): @Html.TextBoxFor(x => x.Value, new TextBoxOptions() { IsEnabled = isEdit }) @Html.LabelFor(x => x.IsVisible): @Html.CheckBoxFor(x => x.IsVisible)
}