Edit.cshtml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. @model EMIS.ViewModel.EnrollManage.SpecialtyManage.CustomStandardSettingView
  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. ComboGridOptions cgopCollege = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "CollegeID",
  12. IsEnabled = isEnable,
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  18. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 },
  19. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. //专业信息
  30. ComboGridOptions cgopSpecialty = new ComboGridOptions
  31. {
  32. TextField = "StandardName",
  33. ValueField = "SpecialtyID",
  34. OnSelect = "querySpecialty",
  35. IsEnabled = isEnable,
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new LinkButtonColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  41. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 },
  42. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.12 },
  43. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.12 },
  44. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
  45. new BoundFieldColumn { FieldName="RecordStatusStr", HeaderText="状态", Align=AlignStyle.Center, Width=0.12 }
  46. },
  47. PageSize = 5,
  48. IsCheckOnSelect = true,
  49. DataSourceUrl = Url.Content("~/Specialty/GetEnableAndUseSpecialtyView" + "?specialtyID=" + Model.SpecialtyID),
  50. IsPagination = true,
  51. IsShowRowNumbers = true,
  52. IsSingleSelect = false,
  53. }
  54. };
  55. }
  56. @section scripts{
  57. <script src="~/Scripts/Business/EnrollManage/SpecialtyManage/CustomStandardSettingEdit.js" type="text/javascript"></script>
  58. }
  59. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  60. @using (Ajax.BeginForm(new AjaxOptions
  61. {
  62. OnSuccess = "EMISFunction.FormSuccess",
  63. OnBegin = "EMISFunction.FormSubmit",
  64. OnComplete = "EMISFunction.FormComplete"
  65. }))
  66. {
  67. <div class="p_title">
  68. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  69. </div>
  70. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  71. @if (Request["type"] != "detail")
  72. {
  73. @Html.ContextMenuBar("Edit")
  74. }
  75. </div>
  76. </div>
  77. <div class="search_list">
  78. @Html.HiddenFor(x => x.CustomStandardSettingID)
  79. <table cellpadding="0" cellspacing="0" id="customStandardSetting">
  80. <tr>
  81. <td style="color:red;">
  82. @Html.LabelFor(x => x.Code):
  83. </td>
  84. <td>
  85. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  86. </td>
  87. <td style="color:red;">
  88. @Html.LabelFor(x => x.CollegeName):
  89. </td>
  90. <td>
  91. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  92. </td>
  93. </tr>
  94. <tr>
  95. <td style="color:red;">
  96. @Html.LabelFor(x => x.YearID):
  97. </td>
  98. <td>
  99. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Year, (x => x.YearID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  100. </td>
  101. <td style="color:red;">
  102. @Html.LabelFor(x => x.SemesterID):
  103. </td>
  104. <td>
  105. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Semester, (x => x.SemesterID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  106. </td>
  107. </tr>
  108. <tr>
  109. <td style="color:red;">
  110. @Html.LabelFor(x => x.StandardName):
  111. </td>
  112. <td>
  113. @Html.ComboGridFor(x => x.SpecialtyID, cgopSpecialty)
  114. </td>
  115. <td>
  116. @Html.LabelFor(x => x.StandardCode):
  117. </td>
  118. <td>
  119. @Html.TextBoxFor(x => x.StandardCode, new TextBoxOptions() { IsEnabled = false })
  120. </td>
  121. </tr>
  122. <tr>
  123. <td>
  124. @Html.LabelFor(x => x.EducationID):
  125. </td>
  126. <td>
  127. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  128. </td>
  129. <td>
  130. @Html.LabelFor(x => x.LearningformID):
  131. </td>
  132. <td>
  133. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  134. </td>
  135. </tr>
  136. <tr>
  137. <td>
  138. @Html.LabelFor(x => x.LearnSystem):
  139. </td>
  140. <td>
  141. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false })
  142. </td>
  143. <td>
  144. @Html.LabelFor(x => x.ScienceclassID):
  145. </td>
  146. <td>
  147. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Scienceclass, (x => x.ScienceclassID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  148. </td>
  149. </tr>
  150. <tr>
  151. <td>
  152. @Html.LabelFor(x => x.Remark):
  153. </td>
  154. <td colspan="3">
  155. @if (!isEnable)
  156. {
  157. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  158. {
  159. { "style", "width: 90%;min-height: 50px" },
  160. { "disabled", "true" }
  161. })
  162. }
  163. else
  164. {
  165. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  166. {
  167. { "style", "width: 90%;min-height: 50px" }
  168. })
  169. }
  170. </td>
  171. </tr>
  172. </table>
  173. </div>
  174. }
  175. </div>