Edit.cshtml 8.7 KB

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