123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- @using Bowin.Web.Controls.Mvc;
- @using EMIS.Web.Controls;
- @{
- ViewBag.Title = "StudentAdd";
- ComboGridOptions cgopCampus = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "CampusID",
- OnSelect = "queryCollege",
- Name = "CampusDropdown",
- ID = "CampusDropdown",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center }
- },
- //OnLoadSuccessFun = "reload",
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Campus/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- }
- };
- ComboGridOptions cgopCollege = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "CollegeID",
- OnSelect = "queryCollege",
- Name = "CollegeDropdown",
- ID = "CollegeDropdown",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
- },
- //OnLoadSuccessFun = "queryClass",
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- }
- };
- ComboGridOptions cgopClassmajor = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "ClassmajorID",
- Name = "ClassmajorDropdown",
- ID = "ClassmajorDropdown",
- OnSelect = "queryClass",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Classmajor/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopStandard = new ComboGridOptions
- {
- TextField = "StandardName",
- ValueField = "StandardID",
- OnSelect = "queryStandard",
- Name = "StandardDictionaryDropDown",
- ID = "StandardDictionaryDropDown",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- }
- };
- }
- @section scripts{
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- function reload() {
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- function Student_Confirm() {
- var d = validChoose();
- var windowID = $.SystemGeneral.getUrlParam("WindowID");
- var maxSelect = $.SystemGeneral.getUrlParam("MaxSelect");
- if (!maxSelect || isNaN(maxSelect)) maxSelect = 0;
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择学生。");
- return;
- }
- if (maxSelect > 0 && d.length > maxSelect) {
- $.messager.alert("系统提示", "只能选择" + maxSelect + "项记录。");
- return;
- }
- top.$("#" + windowID).data("resultData", d);
- top.$("#" + windowID).dialog("close");
- }
- function QueryPhotoUrltmentDropdownList(data) {
- reload();
- }
- function QuerygraduationtmentDropdownList(date) {
- reload();
- }
- function queryCollege(data) {
- queryClass();
- reload();
- }
- function queryStandard(data) {
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- //var educationID = $("#Education").combobox("getValue");
- var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
- //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@@|";
- if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|\@@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|\@@|";
- if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|\@@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- } else {
- $("#ClassmajorDropdown").combogridX("reload");
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- 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:Student_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
- onfocus="this.blur()">选中</a>
- </div>
- </div>
- </div>
- </div>
- <form id="formQuery" method="post">
- @Html.PositionCondition("EM_SelectCourseResult_Student")
- <div class="search_keyword">
- <div class="search_input">
- <ul>
- <li class="sn" style="display:none;">@EMIS.Utility.RSL.Get("Campus"):</li>
- <li class="sv" style="display:none;">
- @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
- </li>
- <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", "dgStudentList" } })
- </li>
- <li class="sn" style="padding-left: 5px;">年级:</li>
- <li class="sv">
- @Html.SchoolYearDropDownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "SchoolyearDictionaryDropDown", Name = "SchoolyearDictionaryDropDown", OnSelect = "queryClass",SelectedValue = BaseExtensions.GetCurrentYearID() }, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
- </li>
- </ul>
- <ul>
- <li class="sn" style="padding-left: 5px;">专业名称:</li>
- <li class="sv">
- @Html.ComboGrid(cgopStandard, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
- </li>
- <li class="sn" style="display:none;">学习形式:</li>
- <li class="sv" style="display:none;">
- @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Learningform, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "LearningformDictionaryDropDown", Name = "LearningformDictionaryDropDown", SelectedValue = BaseExtensions.GetDefaultLearnformForList(), OnSelect = "queryClass" }, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
- </li>
- <li class="sn" style="padding-left: 5px;">班级名称:</li>
- <li class="sv">
- @Html.ComboGrid(cgopClassmajor, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
- </li>
- <li class="sn" style="padding-left: 5px;">在校状态:</li>
- <li class="sv">
- @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "InSchoolStatusDictionaryDropDown", Name = "InSchoolStatusDictionaryDropDown", OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
- </li>
- </ul>
- </div>
- </div>
- </form>
- <div class="search_list">
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn { FieldName="UserID", HeaderText="" },
- new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
- new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.05 },
- new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, Width=0.03 },
- new BoundFieldColumn { FieldName="ClassMajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.12 },
- new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, Width=0.04 }
- },
- PageSize =30 ,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Students/List"),
- ID = "dgStudentList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- })
- </div>
- </div>
|