123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- @using Bowin.Web.Controls.Mvc;
- @using EMIS.Web.Controls;
- @{
- ViewBag.Title = "CoursesTimeList";
-
- }
- @section scripts{
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- function reload() {
- $("#dgCoursesTimeList").cmsXDataTable("load", $.getDataGridParams("dgCoursesTimeList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgCoursesTimeList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- function QueryBuildingsDropdownList(data) {
- reload();
- }
- function CoursesTime_Confirm() {
- var d = validChoose();
- var windowID = $.SystemGeneral.getUrlParam("WindowID");
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择一行记录。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择一行记录。");
- return;
- }
- top.$("#" + windowID).data("resultData", d);
- top.$("#" + windowID).dialog("close");
- }
- function formatStartTime(index, row, value) {
- return (Array(2).join('0') + row.StartHour).slice(-2)
- + ':' + (Array(2).join('0') + row.StartMinutes).slice(-2);
- }
- function formatEndTime(index, row, value) {
- return (Array(2).join('0') + row.EndHour).slice(-2)
- + ':' + (Array(2).join('0') + row.EndMinutes).slice(-2);
- }
- function QueryTimesSegmentDropdownList(data) {
- reload();
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- <div class="p_title">
- @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 节次时间列表</div>*@
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- <div class="current_navbar toolbar">
- <div class="func_info">
- <a class="easyui-linkbutton" href="javascript:CoursesTime_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
- onfocus="this.blur()">选中</a>
- </div>
- </div>
- </div>
- </div>
- <form id="formQuery" method="post">
- <div class="search_keyword">
- <div class="search_input">
- <ul>
- <li class="sn" style="padding-left: 5px;">时间段:</li>
- <li class="sv">
- @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/Activitie/TimesSegmentDropdownListBanid"), ID = "TimesSegmentDropdown", Name = "TimesSegmentDropdown", OnSelect = "QueryTimesSegmentDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgCoursesTimeList" } })
- </li>
- </ul>
- </div>
- </div>
- </form>
- <div class="search_list">
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="CoursesTimeID"},
- new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center, Width=0.02 },
- new BoundFieldColumn { FieldName="TimesSegmentName", HeaderText="时间段", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="StartDate", HeaderText="开始时间", CustomFormatFun="formatStartTime", Align=AlignStyle.Center, Width=0.05 },
- new BoundFieldColumn { FieldName="EndDate", HeaderText="结束时间", CustomFormatFun="formatEndTime", Align=AlignStyle.Center, Width=0.05 }
- },
- PageSize = 20,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/CoursesTime/List"),
- ID = "dgCoursesTimeList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- })
- </div>
- </div>
|