@using Bowin.Web.Controls.Mvc; @using EMIS.Entities; @using EMIS.Web.Controls; @{ ViewBag.Title = "List"; //字典类型 ComboGridOptions cgopDictionary = new ComboGridOptions { TextField = "DictionaryName", ValueField = "DictionaryCode", ID = "DictionaryDropdown", Name = "DictionaryDropdown", OnSelect = "reload", 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 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Dictionary/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; } @section scripts{ }
@Html.Position()
查询条件
@Html.PositionCondition()
  • 类型名称:
  • @Html.ComboGrid(cgopDictionary, new Dictionary { { "data-condition", "dgDictionaryItemList" } })
  • 可否编辑:
  • @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { ID = "DictionaryIsEditable", Name = "DictionaryIsEditable", BindType = DropdownListBindType.SelectAll, OnSelect = "reload" }, new Dictionary { { "data-condition", "dgDictionaryItemList" } })
  • 可否显示:
  • @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { ID = "DictionaryIsVisible", Name = "DictionaryIsVisible", BindType = DropdownListBindType.SelectAll, OnSelect = "reload" }, new Dictionary { { "data-condition", "dgDictionaryItemList" } })
数据字典列表
@Html.ContextMenuBar("List")
@Html.PositionBatchModify()
@Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn{ HeaderText="", FieldName="DictionaryItemID" }, new BoundFieldColumn { FieldName="OrderNo", HeaderText="序号", Align=AlignStyle.Center, Width=0.02 }, new LinkButtonColumn { FieldName="Code", HeaderText="元素代码", Align=AlignStyle.Center, Handle="edit", Width=0.06, OverflowLength=18 }, new BoundFieldColumn { FieldName="Name", HeaderText="元素名称", Align=AlignStyle.Center, Width=0.08 }, new BoundFieldColumn { FieldName="Value", HeaderText="元素值", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }, new BoundFieldColumn { FieldName="DictionaryCode", HeaderText="类型代码", Align=AlignStyle.Center, Width=0.08, OverflowLength=25 }, new BoundFieldColumn { FieldName="DictionaryName", HeaderText="类型名称", Align=AlignStyle.Center, Width=0.06 }, new BoundFieldColumn { FieldName="IsEditableName", HeaderText="可否编辑", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" }, new BoundFieldColumn { FieldName="IsVisibleName", HeaderText="可否显示", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" } }, PageSize = 50, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/DictionaryItem/List"), ID = "dgDictionaryItemList", IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false })