123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "PlanRangeList";
- Guid? specialtyPlanID = new Guid(Request["specialtyPlanID"]);
- //院系所
- ComboGridOptions cgopCollege = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "CollegeID",
- ID = "CollegeDropdown",
- Name = "CollegeDropdown",
- OnSelect = "queryCollege",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- }
- };
- //年级专业
- ComboGridOptions cgopGrademajor = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "GrademajorID",
- Name = "GrademajorDropdown",
- ID = "GrademajorDropdown",
- OnSelect = "reload",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.3 }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Grademajor/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- }
- @section scripts{
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- //刷新
- function reload() {
- $("#dgAdultSpecialtyPlanRangeList").cmsXDataTable("load", $.getDataGridParams("dgAdultSpecialtyPlanRangeList"));
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function SpecialtyPlanRange_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryCollege() {
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- if (collegeID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@@|'})";
- $("#GrademajorDropdown").combogridX("reload", eval(jsonString));
- }
- else {
- $("#GrademajorDropdown").combogridX("reload");
- }
- reload();
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- <form id="formQuery" method="post" action="@Url.Content("~/AdultSpecialtyPlan/PlanRangeListExcel?specialtyPlanID=" + specialtyPlanID)">
- @Html.PositionCondition("AdultSpecialtyPlanRange")
- <div class="search_keyword">
- <div class="search_input">
- <ul>
- <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
- <li class="sv">
- @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanRangeList" } })
- </li>
- <li class="sn" style="padding-left: 5px;">年级专业:</li>
- <li class="sv">
- @Html.ComboGrid(cgopGrademajor, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanRangeList" } })
- </li>
- <li class="sn" style="padding-left: 5px;color:red;">在校状态:</li>
- <li class="sv">
- @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
- {
- ID = "DictionaryInschoolStatus",
- Name = "DictionaryInschoolStatus",
- BindType = DropdownListBindType.SelectAll,
- //SelectedValue = (int)EMIS.ViewModel.CF_INOrOutSchoolStatus.Yes,
- OnSelect = "reload"
- }, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanRangeList" } })
- </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("PlanRange")</div>
- </div>
- </form>
- <div class="search_list">
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="GrademajorID" },
- new BoundFieldColumn { FieldName="Code", HeaderText="年级专业编号", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03 },
- new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="入学学期", Align=AlignStyle.Center, OrderFieldName="SchoolcodeID", Width=0.04 },
- new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
- new BoundFieldColumn { FieldName="Professional", HeaderText="专业方向", Align=AlignStyle.Center, Width=0.04, OverflowLength=5 },
- new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.04, OverflowLength=5, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="ClassmajorCount", HeaderText="班级数", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
- },
- IsPostBack = true,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/AdultSpecialtyPlan/PlanRangeList?specialtyPlanID=" + specialtyPlanID),
- ID = "dgAdultSpecialtyPlanRangeList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- })
- </div>
- </div>
|