Edit.cshtml 12 KB

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