Edit.cshtml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. @model EMIS.ViewModel.EnrollManage.SpecialtyManage.SpecialtyView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. }
  8. @section scripts{
  9. <script src="~/Scripts/Business/EnrollManage/SpecialtyManage/SpecialtyEdit.js" type="text/javascript"></script>
  10. }
  11. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  12. @using (Ajax.BeginForm(new AjaxOptions
  13. {
  14. OnSuccess = "EMISFunction.FormSuccess",
  15. OnBegin = "EMISFunction.FormSubmit",
  16. OnComplete = "EMISFunction.FormComplete"
  17. }))
  18. {
  19. <div class="p_title">
  20. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  21. @if (Request["type"] != "detail")
  22. {
  23. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  24. }
  25. </div>
  26. <div class="search_list">
  27. @Html.HiddenFor(x => x.SpecialtyID)
  28. <table cellpadding="0" cellspacing="0" id="specialtytable">
  29. <tr>
  30. <td style="color:red;">
  31. @Html.LabelFor(x => x.StandardName):
  32. </td>
  33. <td>
  34. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.StandardID),DropdownListBindType.PleaseSelect,
  35. new ComboGridOptions
  36. {
  37. OnSelect = "QueryStandard",
  38. IsEnabled = isEnable,
  39. GridOptions = new DataGridOptions
  40. {
  41. Columns = new List<DataGridColumn>()
  42. {
  43. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  44. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  45. }
  46. }
  47. })
  48. </td>
  49. <td style="color:red;">
  50. @Html.LabelFor(x => x.Code):
  51. </td>
  52. <td>
  53. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = false })
  54. </td>
  55. </tr>
  56. <tr>
  57. <td style="color:red;">
  58. @Html.LabelFor(x => x.EducationID):
  59. </td>
  60. <td>
  61. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  62. </td>
  63. <td style="color:red;">
  64. @Html.LabelFor(x => x.LearningformID):
  65. </td>
  66. <td>
  67. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  68. </td>
  69. </tr>
  70. <tr>
  71. <td style="color:red;">
  72. @Html.LabelFor(x => x.LearnSystem):
  73. </td>
  74. <td>
  75. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = isEnable })
  76. </td>
  77. <td>
  78. @Html.LabelFor(x => x.ScienceclassID):
  79. </td>
  80. <td>
  81. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Scienceclass, (x => x.ScienceclassID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>
  86. @Html.LabelFor(x => x.PropertyID):
  87. </td>
  88. <td>
  89. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Property, (x => x.PropertyID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  90. </td>
  91. <td>
  92. @Html.LabelFor(x => x.StandardTitle):
  93. </td>
  94. <td>
  95. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StandardTitle, (x => x.StandardTitle), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  96. </td>
  97. </tr>
  98. <tr>
  99. <td>
  100. @Html.LabelFor(x => x.StandardLevel):
  101. </td>
  102. <td>
  103. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StandardLevel, (x => x.StandardLevel), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  104. </td>
  105. <td style="color:red;">
  106. @Html.LabelFor(x => x.RecordStatus):
  107. </td>
  108. <td>
  109. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.SYS_STATUS, (x => x.RecordStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>
  114. @Html.LabelFor(x => x.Remark):
  115. </td>
  116. <td colspan="3">
  117. @if (!isEnable)
  118. {
  119. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  120. {
  121. { "style", "width: 90%;min-height: 50px" },
  122. { "disabled", "true" }
  123. })
  124. }
  125. else
  126. {
  127. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 50px" } })
  128. }
  129. </td>
  130. </tr>
  131. </table>
  132. </div>
  133. }
  134. </div>