Edit.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. @model EMIS.ViewModel.UniversityManage.SpecialtyClassManage.ClassmajorView
  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. OnSelect = "queryCollege",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 },
  20. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  21. },
  22. PageSize = 5,
  23. IsCheckOnSelect = true,
  24. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  25. IsPagination = true,
  26. IsShowRowNumbers = true,
  27. IsSingleSelect = false
  28. }
  29. };
  30. //年级专业
  31. ComboGridOptions cgopGrademajor = new ComboGridOptions
  32. {
  33. TextField = "Name",
  34. ValueField = "GrademajorID",
  35. OnSelect = "queryGrademajor",
  36. IsEnabled = isEnable,
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Width=0.2, Align=AlignStyle.Center },
  42. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Width=0.3, Align=AlignStyle.Center },
  43. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Width=0.1, Align=AlignStyle.Center },
  44. //new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.2, Align=AlignStyle.Center },
  45. new BoundFieldColumn { FieldName="EducationName", HeaderText=@EMIS.Utility.RSL.Get("EducationID"), Width=0.1, Align=AlignStyle.Center },
  46. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Width=0.1, Align=AlignStyle.Center },
  47. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Width=0.1, Align=AlignStyle.Center }
  48. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Width=0.2, Align=AlignStyle.Center }
  49. },
  50. PageSize = 5,
  51. IsCheckOnSelect = true,
  52. DataSourceUrl = Url.Content("~/Grademajor/List"),
  53. IsPagination = true,
  54. IsShowRowNumbers = true,
  55. IsSingleSelect = false
  56. }
  57. };
  58. ComboGridOptions cgopUser = new ComboGridOptions
  59. {
  60. TextField = "Name",
  61. ValueField = "UserID",
  62. IsEnabled = isEnable,
  63. GridOptions = new DataGridOptions
  64. {
  65. Columns = new List<DataGridColumn>()
  66. {
  67. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1 },
  68. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1 },
  69. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.2 }
  70. },
  71. PageSize = 5,
  72. IsCheckOnSelect = true,
  73. DataSourceUrl = Url.Content("~/Staff/List"),
  74. IsPagination = true,
  75. IsShowRowNumbers = true,
  76. IsSingleSelect = false
  77. }
  78. };
  79. ComboGridOptions cgopAssistant = new ComboGridOptions
  80. {
  81. TextField = "Name",
  82. ValueField = "UserID",
  83. IsEnabled = isEnable,
  84. GridOptions = new DataGridOptions
  85. {
  86. Columns = new List<DataGridColumn>()
  87. {
  88. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1 },
  89. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1 },
  90. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.2 }
  91. },
  92. PageSize = 5,
  93. IsCheckOnSelect = true,
  94. DataSourceUrl = Url.Content("~/Staff/List"),
  95. IsPagination = true,
  96. IsShowRowNumbers = true,
  97. IsSingleSelect = false
  98. }
  99. };
  100. }
  101. @section scripts{
  102. <script src="~/Scripts/Business/UniversityManage/SpecialtyClassManage/ClassmajorEdit.js" type="text/javascript"></script>
  103. <script type="text/javascript">
  104. var nonSelect = "@DropdownList.SELECT_ALL";
  105. </script>
  106. }
  107. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  108. @using (Ajax.BeginForm(new AjaxOptions
  109. {
  110. OnSuccess = "EMISFunction.FormSuccess",
  111. OnBegin = "EMISFunction.FormSubmit",
  112. OnComplete = "EMISFunction.FormComplete"
  113. }))
  114. {
  115. <div class="p_title">
  116. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  117. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  118. @if (Request["type"] != "detail")
  119. {
  120. @Html.ContextMenuBar("Edit")
  121. }
  122. </div>
  123. </div>
  124. <div class="search_list">
  125. @Html.HiddenFor(x => x.ClassmajorID)
  126. <table cellpadding="0" cellspacing="0" id="facultymajortable">
  127. <tr>
  128. <td>
  129. @Html.LabelFor(x => x.No):
  130. </td>
  131. <td>
  132. @Html.TextBoxFor(x => x.No, new TextBoxOptions() { IsEnabled = isEnable })
  133. </td>
  134. <td style="color:red;">
  135. @Html.LabelFor(x => x.ClassNum):
  136. </td>
  137. <td>
  138. @Html.TextBoxFor(x => x.ClassNum, new TextBoxOptions() { IsEnabled = isEnable })
  139. </td>
  140. </tr>
  141. <tr>
  142. <td>
  143. @Html.LabelFor(x => x.Name):
  144. </td>
  145. <td colspan="3">
  146. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:85%;" } })
  147. </td>
  148. </tr>
  149. <tr>
  150. <td>
  151. @Html.LabelFor(x => x.Abbreviation):
  152. </td>
  153. <td>
  154. @Html.TextBoxFor(x => x.Abbreviation, new TextBoxOptions() { IsEnabled = isEnable })
  155. </td>
  156. <td>
  157. @Html.LabelFor(x => x.EnglishName):
  158. </td>
  159. <td>
  160. @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
  161. </td>
  162. </tr>
  163. <tr>
  164. <td colspan="4" style="padding:1px;height:10px;">
  165. <div id="grademajorExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  166. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  167. onclick="swapGrademajor();">
  168. </div>
  169. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapGrademajor();">
  170. 年级专业信息
  171. </div>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td>
  176. @Html.LabelFor(x => x.CollegeName):
  177. </td>
  178. <td>
  179. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  180. </td>
  181. <td>
  182. @Html.LabelFor(x => x.GradeID):
  183. </td>
  184. <td>
  185. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.GradeID), DropdownListBindType.PleaseSelect,
  186. new ComboGridOptions()
  187. {
  188. IsEnabled = isEnable,
  189. OnSelect = "queryGrade"
  190. })
  191. </td>
  192. </tr>
  193. <tr>
  194. <td>
  195. @Html.LabelFor(x => x.StandardName):
  196. </td>
  197. <td>
  198. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.StandardID), DropdownListBindType.PleaseSelect,
  199. new ComboGridOptions
  200. {
  201. IsEnabled = isEnable,
  202. OnSelect = "queryStandard",
  203. GridOptions = new DataGridOptions
  204. {
  205. Columns = new List<DataGridColumn>()
  206. {
  207. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  208. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  209. }
  210. }
  211. })
  212. </td>
  213. <td>
  214. @Html.LabelFor(x => x.EducationName):
  215. </td>
  216. <td>
  217. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.EducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  218. </td>
  219. </tr>
  220. <tr>
  221. <td>
  222. @Html.LabelFor(x => x.LearningformName):
  223. </td>
  224. <td>
  225. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.LearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  226. </td>
  227. <td>
  228. @Html.LabelFor(x => x.LearnSystem):
  229. </td>
  230. <td>
  231. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled=false })
  232. </td>
  233. </tr>
  234. <tr>
  235. <td style="color:red;">
  236. @Html.LabelFor(x => x.GrademajorID):
  237. </td>
  238. <td colspan="3">
  239. @Html.ComboGridFor(x => x.GrademajorID, cgopGrademajor, new Dictionary<string, string> { { "style", "width:85%;" } })
  240. </td>
  241. </tr>
  242. <tr>
  243. <td colspan="4" style="padding:1px;height:10px;">
  244. <div id="otherExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  245. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;">
  246. </div>
  247. <div style="float: left;height: 10px; cursor: pointer; color: red;">
  248. 其它信息
  249. </div>
  250. </td>
  251. </tr>
  252. <tr>
  253. <td>
  254. @Html.LabelFor(x => x.UserID):
  255. </td>
  256. <td>
  257. @Html.ComboGridFor(x => x.UserID, x => x.UserName, cgopUser)
  258. </td>
  259. <td>
  260. @Html.LabelFor(x => x.AssistantUserID):
  261. </td>
  262. <td>
  263. @Html.ComboGridFor(x => x.AssistantUserID, x => x.AssistantUserName, cgopAssistant)
  264. </td>
  265. </tr>
  266. <tr>
  267. <td>
  268. @Html.LabelFor(x => x.Fixedclassroom):
  269. </td>
  270. <td colspan="3">
  271. @Html.TextBoxFor(x => x.Fixedclassroom, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width: 85%;min-height: 20px" } })
  272. @*@Html.TextBoxFor(x => x.Fixedclassroom, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:85%;" } })*@
  273. </td>
  274. </tr>
  275. <tr>
  276. <td>
  277. @Html.LabelFor(x => x.Remark):
  278. </td>
  279. <td colspan="3">
  280. @if (!isEnable)
  281. {
  282. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  283. {
  284. { "style", "width: 90%;min-height: 60px" },
  285. { "disabled", "true" }
  286. })
  287. }
  288. else
  289. {
  290. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  291. }
  292. </td>
  293. </tr>
  294. </table>
  295. </div>
  296. }
  297. </div>