List.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Entities;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "List";
  6. ComboGridOptions cgopCourse = new ComboGridOptions
  7. {
  8. TextField = "CourseName",
  9. ValueField = "CoursematerialID",
  10. Name = "CoursematerialIDDropdownGridBo",
  11. ID = "CoursematerialIDDropdownGridBo",
  12. OnSelect = "QueryCoursematerialComboGrid",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. //new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Width=0.1, Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.3, Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false
  25. }
  26. };
  27. ComboGridOptions cgopCampus = new ComboGridOptions
  28. {
  29. TextField = "Name",
  30. ValueField = "CampusID",
  31. OnSelect = "queryCollege",
  32. Name = "CampusDropdown",
  33. ID = "CampusDropdown",
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
  39. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center }
  40. },
  41. //OnLoadSuccessFun = "reload",
  42. IsCheckOnSelect = true,
  43. DataSourceUrl = Url.Content("~/Campus/List"),
  44. IsPagination = true,
  45. IsShowRowNumbers = true,
  46. IsSingleSelect = false,
  47. }
  48. };
  49. ComboGridOptions cgopCollege = new ComboGridOptions
  50. {
  51. TextField = "Name",
  52. ValueField = "CollegeID",
  53. OnSelect = "queryClass",
  54. Name = "CollegeDropdown",
  55. ID = "CollegeDropdown",
  56. GridOptions = new DataGridOptions
  57. {
  58. Columns = new List<DataGridColumn>()
  59. {
  60. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
  61. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  62. },
  63. OnLoadSuccessFun = "reload",
  64. IsCheckOnSelect = true,
  65. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  66. IsPagination = true,
  67. IsShowRowNumbers = true,
  68. IsSingleSelect = false,
  69. }
  70. };
  71. ComboGridOptions cgopClassmajor = new ComboGridOptions
  72. {
  73. TextField = "Name",
  74. ValueField = "ClassmajorID",
  75. Name = "ClassmajorDropdown",
  76. ID = "ClassmajorDropdown",
  77. OnSelect = "reload",
  78. GridOptions = new DataGridOptions
  79. {
  80. Columns = new List<DataGridColumn>()
  81. {
  82. //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center },
  83. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center }
  84. },
  85. IsCheckOnSelect = true,
  86. DataSourceUrl = Url.Content("~/Classmajor/List"),
  87. IsPagination = true,
  88. IsShowRowNumbers = true,
  89. IsSingleSelect = false
  90. }
  91. };
  92. ComboGridOptions cgopStandard = new ComboGridOptions
  93. {
  94. TextField = "StandardName",
  95. ValueField = "StandardID",
  96. OnSelect = "queryStandard",
  97. Name = "StandardDictionaryDropDown",
  98. ID = "StandardDictionaryDropDown",
  99. GridOptions = new DataGridOptions
  100. {
  101. Columns = new List<DataGridColumn>()
  102. {
  103. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center }
  104. },
  105. IsCheckOnSelect = true,
  106. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  107. IsPagination = true,
  108. IsShowRowNumbers = true,
  109. IsSingleSelect = false,
  110. }
  111. };
  112. }
  113. @section scripts{
  114. <script src="~/Scripts/Business/SelectCourseManage/OptionalCourseSetting.js" type="text/javascript"></script>
  115. <script type="text/javascript">
  116. var nonSelect = "@DropdownList.SELECT_ALL";
  117. var NotOpenStatus = "@EMIS.ViewModel.EM_SelectCourseResultStatus.NotOpen";
  118. var CreatedStatus = "@EMIS.ViewModel.EM_SelectCourseResultStatus.Created";
  119. var OpenedStatus = "@EMIS.ViewModel.EM_SelectCourseResultStatus.Opened";
  120. </script>
  121. }
  122. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  123. @Html.Position()
  124. <div class="p_SearchTitle">
  125. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  126. 查询条件</div>
  127. </div>
  128. <form id="formQuery" method="post" action="@Url.Content("~/OptionalCourseSetting/Excel")">
  129. @Html.PositionCondition()
  130. <div class="search_keyword">
  131. <div class="search_input">
  132. <ul>
  133. <li class="sn" style="display:none" >@EMIS.Utility.RSL.Get("Campus"):</li>
  134. <li class="sv" style="display:none">
  135. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  136. </li>
  137. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  138. <li class="sv">
  139. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"), ID = "SchoolyearDropdown", Name = "SchoolyearDropdown", OnSelect = "reload", OnLoadSuccess = "reload", SelectedValue = BaseExtensions.GetCurrentSchoolYearID() }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  140. </li>
  141. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  142. <li class="sv">
  143. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  144. </li>
  145. <li class="sn" style="padding-left: 5px;">年级:</li>
  146. <li class="sv">
  147. @Html.SchoolYearDropDownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "SchoolyearDictionaryDropDown", Name = "SchoolyearDictionaryDropDown", OnSelect = "queryClass" }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  148. </li>
  149. </ul>
  150. <ul>
  151. <li class="sn" style="padding-left: 5px;">专业名称:</li>
  152. <li class="sv">
  153. @Html.ComboGrid(cgopStandard, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  154. </li>
  155. <li class="sn" style="padding-left: 5px;">课程名称:</li>
  156. <li class="sv">
  157. @Html.ComboGrid(cgopCourse, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  158. </li>
  159. @*<li class="sn" style="padding-left: 5px;">开课年级:</li>
  160. <li class="sv">
  161. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, new DropdownListOptions { Name = "DictionarySchoolYearNum", BindType = DropdownListBindType.SelectAll, OnSelect = "QuerySchoolYearNumDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  162. </li>*@ @*<li class="sn" style="padding-left: 5px;">学期:</li>
  163. <li class="sv">
  164. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Semester, new DropdownListOptions { Name = "DictionarySchoolCode", BindType = DropdownListBindType.SelectAll, OnSelect = "QuerySchoolYearNumDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  165. </li>*@ @*<li class="sn" style="padding-left: 5px;">是否启用:</li>
  166. <li class="sv">
  167. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { Name = "DictionaryIsEnable", BindType = DropdownListBindType.SelectAll, OnSelect = "QueryIsEnableDropdownList", OnLoadSuccess = "reload" }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  168. </li>*@
  169. @*<li class="sn" style="padding-left: 5px;">是否开放:</li>
  170. <li class="sv">
  171. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { Name = "DictionaryIsOpen", BindType = DropdownListBindType.SelectAll, OnSelect = "QueryIsOpenDropdownList", OnLoadSuccess = "reload" }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  172. </li>*@
  173. <li class="sn" style="padding-left: 5px;">状态:</li>
  174. <li class="sv">
  175. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.EM_SelectCourseResultStatus, new DropdownListOptions { Name = "DictionaryStatus", BindType = DropdownListBindType.SelectAll, OnSelect = "QueryIsOpenDropdownList", OnLoadSuccess = "reload" }, new Dictionary<string, string> { { "data-condition", "dgOptionalCourseSettingList" } })
  176. </li>
  177. </ul>
  178. </div>
  179. </div>
  180. <div class="p_title">
  181. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  182. 限选设定列表</div>
  183. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  184. </div>
  185. </form>
  186. @Html.PositionBatchModify()
  187. <div class="search_list">
  188. @using (Html.BeginForm("Save", "OptionalCourseSetting", FormMethod.Post, new { id = "frmSaveOptionalCourse" }))
  189. {
  190. @Html.DataGrid(new DataGridOptions
  191. {
  192. Columns = new List<DataGridColumn>()
  193. {
  194. new CheckBoxFieldColumn{ HeaderText="", FieldName="ExecutableOptionalCourseID"},
  195. //new BoundFieldColumn { FieldName="GSchoolYearCode", HeaderText="入学学期", Align=AlignStyle.Center, Width=0.06 },
  196. new LinkButtonColumn { FieldName="SchoolYearCode", HeaderText="学年学期", Align=AlignStyle.Center, Handle="edit", Width=0.06 },
  197. //new BoundFieldColumn { FieldName="Grade", HeaderText="年级", Align=AlignStyle.Center, Width=0.03 },
  198. //new BoundFieldColumn { FieldName="StandardDesc", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  199. new BoundFieldColumn { FieldName="DefaultClassName", HeaderText="选修任务班名称", Align=AlignStyle.Center, Width=0.12 },
  200. //new BoundFieldColumn { FieldName="GrademajorCode", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.06 },
  201. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  202. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.04 },
  203. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.08 },
  204. new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", Align=AlignStyle.Center, Width=0.05, OverflowLength=5 },
  205. new BoundFieldColumn { FieldName="Credit", HeaderText="学分", Align=AlignStyle.Center, Width=0.02 },
  206. //new BoundFieldColumn { FieldName="TheoryCourse", HeaderText="理论学时", Align=AlignStyle.Center, Width=0.04 },
  207. //new BoundFieldColumn { FieldName="Practicehours", HeaderText="实践学时", Align=AlignStyle.Center, Width=0.04 },
  208. //new BoundFieldColumn { FieldName="Trialhours", HeaderText="实验学时", Align=AlignStyle.Center, Width=0.04 },
  209. new BoundFieldColumn { FieldName="Totalhours", HeaderText="总学时", Align=AlignStyle.Center, Width=0.03 },
  210. new BoundFieldColumn { FieldName="StartEndWeeklyNum", HeaderText="起止周次", Align=AlignStyle.Center, Width=0.04 },
  211. new BoundFieldColumn { FieldName="SchoolyearNumName", HeaderText="开课学年", Align=AlignStyle.Center, Width=0.04 },
  212. new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="学期", Align=AlignStyle.Center, Width=0.02 },
  213. new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", Align=AlignStyle.Center, Width=0.04 },
  214. new BoundFieldColumn { FieldName="PeopleNumlower", HeaderText="人数下限", Align=AlignStyle.Center, Width=0.04 },
  215. new BoundFieldColumn { FieldName="PeopleNumlimit", HeaderText="人数上限", Align=AlignStyle.Center, Width=0.04 },
  216. new BoundFieldColumn { FieldName="DepartmentName", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.08 },
  217. new LinkButtonColumn { FieldName="ClassCount", HeaderText="开放范围", Align=AlignStyle.Center , Handle="StudentList", Width=0.04 },
  218. //new BoundFieldColumn { FieldName="HandleModeName", HeaderText="处理方式", Align=AlignStyle.Center, Width=0.04 },
  219. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.1 },
  220. //new BoundFieldColumn { FieldName="IsEnableDesc", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.04 },
  221. //new BoundFieldColumn { FieldName="IsOpenedDesc", HeaderText="是否开放", Align=AlignStyle.Center, Width=0.04 },
  222. new BoundFieldColumn { FieldName="RecordStatusName", HeaderText="状态", Align=AlignStyle.Center, Width=0.03 },
  223. new BoundFieldColumn { FieldName="RecordStatus", HeaderText="状态", Align=AlignStyle.Center, Width=0.03, IsHidden=true },
  224. new BoundFieldColumn { FieldName="RecordStatusCode", HeaderText="状态", Align=AlignStyle.Center, Width=0.03, IsHidden=true }
  225. },
  226. PageSize = 20 ,
  227. IsPostBack = true,
  228. IsCheckOnSelect = true,
  229. DataSourceUrl = Url.Content("~/OptionalCourseSetting/List"),
  230. ID = "dgOptionalCourseSettingList",
  231. IsAutoLoad = true,
  232. IsPagination = true,
  233. IsShowRowNumbers = true,
  234. IsSingleSelect = false
  235. })
  236. }
  237. </div>
  238. </div>