CourseProcessClassroomList.cshtml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ComboGridOptions cgop = new ComboGridOptions
  5. {
  6. TextField = "Name",
  7. ValueField = "BuildingsInfoID",
  8. Name = "BuildingsDropdown",
  9. OnSelect = "QueryBuildingsDropdownList",
  10. GridOptions = new DataGridOptions
  11. {
  12. Columns = new List<DataGridColumn>()
  13. {
  14. new BoundFieldColumn { FieldName="Name", HeaderText="建筑物名称", Width=0.3, Align=AlignStyle.Center }
  15. },
  16. IsCheckOnSelect = true,
  17. DataSourceUrl = Url.Content("~/Buildings/List"),
  18. IsPagination = true,
  19. IsShowRowNumbers = true,
  20. IsSingleSelect = false
  21. }
  22. };
  23. }
  24. @section scripts{
  25. <script type="text/javascript">
  26. var nonSelect = "@DropdownList.SELECT_ALL";
  27. function reload() {
  28. $("#dgClassroomList").cmsXDataTable("load", $.getDataGridParams("dgClassroomList"));
  29. }
  30. //获取选中的数据
  31. function validChoose() {
  32. var d = [];
  33. $.each($("#dgClassroomList").cmsXDataTable("getSelections"), function (index) {
  34. d.push(this);
  35. });
  36. return d;
  37. }
  38. function QueryBuildingsDropdownList(data) {
  39. reload();
  40. }
  41. function Classroom_Confirm() {
  42. var d = validChoose();
  43. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  44. var maxSelect = $.SystemGeneral.getUrlParam("MaxSelect");
  45. if (!maxSelect || isNaN(maxSelect)) maxSelect = 0;
  46. if (d.length == 0) {
  47. $.messager.alert("系统提示", "请选择教室。");
  48. return;
  49. }
  50. if (maxSelect > 0 && d.length > maxSelect) {
  51. $.messager.alert("系统提示", "只能选择" + maxSelect + "项记录。");
  52. return;
  53. }
  54. top.$("#" + windowID).data("resultData", d);
  55. top.$("#" + windowID).dialog("close");
  56. }
  57. </script>
  58. }
  59. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  60. <div class="p_title">
  61. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  62. 教室列表
  63. </div>
  64. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  65. <div class="current_navbar toolbar">
  66. <div class="func_info">
  67. <a class="easyui-linkbutton" href="javascript:Classroom_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  68. onfocus="this.blur()">选中</a>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <form id="formQuery" method="post">
  74. @Html.PositionCondition("ClassroomSelect", null)
  75. @*@Html.Hidden("ClassroomType", Request["ClassroomTypeID"], new Dictionary<string, object> { { "data-condition", "dgClassroomList" } })*@
  76. @Html.Hidden("schedulingWeek", Request["schedulingWeek"], new Dictionary<string, object> { { "data-condition", "dgClassroomList" } })
  77. @Html.Hidden("weekDay", Request["weekDay"], new Dictionary<string, object> { { "data-condition", "dgClassroomList" } })
  78. @Html.Hidden("coursesTimeID", Request["coursesTimeID"], new Dictionary<string, object> { { "data-condition", "dgClassroomList" } })
  79. <div class="search_keyword">
  80. <div class="search_input">
  81. <ul>
  82. <li class="sn" style="padding-left: 5px;">所在建筑物:</li>
  83. <li class="sv">
  84. @Html.ComboGrid(cgop, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  85. </li>
  86. @*<li class="sn" style="padding-left: 5px;">教室类型:</li>
  87. <li class="sv">
  88. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_ClassroomType, new DropdownListOptions { Name = "ClassroomType", BindType = DropdownListBindType.SelectAll, OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  89. </li>*@
  90. </ul>
  91. </div>
  92. </div>
  93. </form>
  94. <div class="search_list">
  95. @Html.DataGrid(new DataGridOptions
  96. {
  97. Columns = new List<DataGridColumn>()
  98. {
  99. new CheckBoxFieldColumn{ HeaderText="", FieldName="ClassroomID" },
  100. new BoundFieldColumn { FieldName="Code", HeaderText="教室代码", Align=AlignStyle.Center },
  101. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center },
  102. new BoundFieldColumn { FieldName="FloorLevel", HeaderText="所在楼层", Align=AlignStyle.Center },
  103. new BoundFieldColumn { FieldName="Totalseating", HeaderText="总座位数", Align=AlignStyle.Center },
  104. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  105. new BoundFieldColumn { FieldName="IsAvailableName", HeaderText="是否可用", Align=AlignStyle.Center }
  106. },
  107. IsCheckOnSelect = true,
  108. DataSourceUrl = Url.Content("~/FreeSelectionCourseApply/GetCourseProcessClassroomList"),
  109. ID = "dgClassroomList",
  110. IsPagination = true,
  111. IsShowRowNumbers = true,
  112. IsSingleSelect = false
  113. })
  114. </div>
  115. </div>