123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- @using Bowin.Web.Controls.Mvc;
- @using EMIS.Entities;
- @using EMIS.Web.Controls;
- @{
- ViewBag.Title = "List";
- }
- @section scripts{
-
- <script type="text/javascript">
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/FreeSelectionCouseControl/Edit";
- var nonSelect = "@DropdownList.SELECT_ALL";
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- function FreeSelectCourseControl_Export() {
- $(document.forms[0]).submit();
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSelectCourseControlList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.FreeSelectionCourseGradeYearSettingID);
- });
- return d;
- }
- function FreeSelectCourseControl_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow("任选控制新增", redirectTo, 650, 300, null, null);
- }
- function reload() {
- $("#dgSelectCourseControlList").cmsXDataTable("load", $.getDataGridParams("dgSelectCourseControlList"));
- }
- //修改按钮
- function FreeSelectCourseControl_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?FreeSelectionCourseGradeYearSettingID=" + d + "&MNU=" + mnu;
- $.popupTopWindow("任选控制修改", redirectTo, 650, 300, null, null);
- }
- //删除
- function FreeSelectCourseControl_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/FreeSelectionCouseControl/Delete', { freeSelectionCourseGradeYearSettingIDs: d }, function (data) {
- if (data == "删除成功!") {
- $.messager.alert("系统提示", data);
- $("#dgSelectCourseControlList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @Html.Position()
- <div class="p_SearchTitle">
- <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
- 查询条件</div>
- </div>
- <form id="formQuery" method="post" action="@Url.Content("~/FreeSelectionCouseControl/Excel")">
- @Html.PositionCondition()
- <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("~/SchoolYear/DropDown"), ID = "SchoolyearDropdown", Name = "SchoolyearDropdown", OnSelect = "reload", OnLoadSuccess = "reload", SelectedValue = BaseExtensions.GetCurrentSchoolYearID() }, new Dictionary<string, string> { { "data-condition", "dgSelectCourseControlList" } })
- </li>
- <li class="sn" style="padding-left: 5px;">年级:</li>
- <li class="sv">
- @Html.SchoolYearDropDownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "SchoolyearDictionaryDropDown", Name = "SchoolyearDictionaryDropDown", OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgSelectCourseControlList" } })
- </li>
- </ul>
- </div>
- </div>
- <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;">@Html.ContextMenuBar("List")</div>
- </div>
- </form>
- @Html.PositionBatchModify()
- <div class="search_list">
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="FreeSelectionCourseGradeYearSettingID"},
- new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Handle="edit", Width=0.06 },
- new BoundFieldColumn { FieldName="GradeYear", HeaderText="年级", Align=AlignStyle.Center, Width=0.03 },
- new BoundFieldColumn { FieldName="MinSelectCount", HeaderText="门数下限", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="MaxSelectCount", HeaderText="门数上限", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="MinCredit", HeaderText="学分下限", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="MaxCredit", HeaderText="学分上限", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="StartTime", HeaderText="开始时间", Formatter=Formatter.LongDate, Align=AlignStyle.Center, Width=0.12 },
- new BoundFieldColumn { FieldName="EndTime", HeaderText="结束时间", Formatter=Formatter.LongDate, Align=AlignStyle.Center, Width=0.12 },
- new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Formatter=Formatter.LongDate, Align=AlignStyle.Center, Width=0.03, OverflowLength=5 }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/FreeSelectionCouseControl/List"),
- ID = "dgSelectCourseControlList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- })
- </div>
- </div>
|