Edit.cshtml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. @model EMIS.ViewModel.SystemView.DictionaryItemView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEdit = (Request["DictionaryItemID"] ?? "") == "" || Request["isCodeAdd"] == "1";
  7. var isEditable = Model.IsEditable;
  8. //字典类型
  9. ComboGridOptions cgopDictionary = new ComboGridOptions
  10. {
  11. TextField = "DictionaryName",
  12. ValueField = "DictionaryCode",
  13. ID = "DictionaryDropdown",
  14. Name = "DictionaryDropdown",
  15. IsEnabled = isEdit,
  16. GridOptions = new DataGridOptions
  17. {
  18. Columns = new List<DataGridColumn>()
  19. {
  20. //new BoundFieldColumn { FieldName="DictionaryCode",HeaderText="类型代码", Align=AlignStyle.Center, Width=0.2 },
  21. new BoundFieldColumn { FieldName="DictionaryName",HeaderText="类型名称", Align=AlignStyle.Center, Width=0.12 }
  22. },
  23. PageSize = 5,
  24. IsCheckOnSelect = true,
  25. DataSourceUrl = Url.Content("~/Dictionary/List"),
  26. IsPagination = true,
  27. IsShowRowNumbers = true,
  28. IsSingleSelect = false
  29. }
  30. };
  31. }
  32. @section scripts{
  33. <script src="~/Scripts/Business/System/DictionaryItemEdit.js" type="text/javascript"></script>
  34. <script type="text/javascript">
  35. </script>
  36. }
  37. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  38. @using (Ajax.BeginForm(new AjaxOptions
  39. {
  40. OnSuccess = "EMISFunction.FormSuccess",
  41. OnBegin = "EMISFunction.FormSubmit",
  42. OnComplete = "EMISFunction.FormComplete"
  43. }))
  44. {
  45. <div class="p_title">
  46. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  47. @*数据字典信息*@
  48. </div>
  49. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  50. @if (ViewBag.Type != "1")//控制列表进入、屏蔽按钮权限
  51. {
  52. @Html.ContextMenuBar("Edit")
  53. }
  54. </div>
  55. </div>
  56. <div class="search_list">
  57. <table cellpadding="0" cellspacing="0">
  58. @Html.HiddenFor(x => x.DictionaryItemID)
  59. <tr >
  60. <td>
  61. @Html.LabelFor(x => x.DictionaryName):
  62. </td>
  63. <td>
  64. @Html.ComboGridFor(x => x.DictionaryCode, cgopDictionary)
  65. </td>
  66. <td>
  67. @Html.LabelFor(x => x.OrderNo):
  68. </td>
  69. <td>
  70. @Html.TextBoxFor(x => x.OrderNo)
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>
  75. @Html.LabelFor(x => x.Code):
  76. </td>
  77. <td>
  78. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEdit })
  79. </td>
  80. <td>
  81. @Html.LabelFor(x => x.Name):
  82. </td>
  83. <td>
  84. @Html.TextBoxFor(x => x.Name)
  85. </td>
  86. </tr>
  87. <tr>
  88. <td style="color: red;">
  89. @Html.LabelFor(x => x.Value):
  90. </td>
  91. <td>
  92. @Html.TextBoxFor(x => x.Value, new TextBoxOptions() { IsEnabled = isEdit })
  93. </td>
  94. <td style="color: red;">
  95. @Html.LabelFor(x => x.IsVisible):
  96. </td>
  97. <td>
  98. @Html.CheckBoxFor(x => x.IsVisible)
  99. </td>
  100. </tr>
  101. </table>
  102. </div>
  103. }
  104. </div>