123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- @model EMIS.ViewModel.EvaluationManage.StudentEvaluation.EvaluationStudentSettingDetailView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "EvaluationStudentEdit";
- var isEnable = Request["type"] == "detail" ? false : true;
- //院系所
- ComboGridOptions cgopCollege = new ComboGridOptions
- {
- ID = "CollegeID",
- TextField = "Name",
- ValueField = "CollegeID",
- IsEnabled = false,
- 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 cgopDepartment = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "DepartmentID",
- IsEnabled = false,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="Name", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.2 },
- new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CourseCollege"), Align=AlignStyle.Center, Width=0.2 }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Department/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- //课程信息
- ComboGridOptions cgopCourse = new ComboGridOptions
- {
- ID = "CoursematerialID",
- TextField = "CourseName",
- ValueField = "CoursematerialID",
- IsEnabled = false,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 },
- new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- //学生信息
- ComboGridOptions cgopStudent = new ComboGridOptions
- {
- TextField = "StudentNo",
- ValueField = "UserID",
- OnSelect = "queryStudent",
- IsEnabled = isEnable,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="StudentNo", HeaderText="学号", Width=0.2, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.08, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StandardID", OverflowLength=6 },
- new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Width=0.06, Align=AlignStyle.Center, OverflowLength=6 },
- //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.1, Align=AlignStyle.Center, OverflowLength=6 },
- new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", CustomFormatFun="SetRedColumn" }
- //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StudentStatus", CustomFormatFun="SetRedColumn" }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Student/StudentBaseInSchoolList?userID=" + Model.UserID),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- }
- @section scripts{
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- var evaluationStudentSettingID = top.$("#@(Request["WindowID"])").data("inputData");
- $("#evaluationStudentSettingID").val(evaluationStudentSettingID);
- });
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //学生信息
- function queryStudent(data) {
- var userID = $("#UserID").combogridX("getValue");
- if (userID == "" || userID == "-1" || userID == null) {
- $("#Name").val("");
- }
- else {
- $("#Name").val(data.Name);
- }
- }
- //确定
- function EvaluationStudentDetail_Confirm() {
- var evaluationStudentSettingID = document.getElementById("evaluationStudentSettingID").value;
- if (evaluationStudentSettingID == "" || evaluationStudentSettingID == "-1" || evaluationStudentSettingID == null) {
- $.messager.alert("系统提示", "数据有误,请核查。");
- return;
- }
- var userID = $("#UserID").combogridX("getValue");
- if (userID == "" || userID == "-1" || userID == null) {
- $.messager.alert("系统提示", "请选择要添加的学生。");
- return;
- }
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/EvaluationStudentEdit', { evaluationStudentSettingID: evaluationStudentSettingID, userID: userID }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationStudentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccessNoClose",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
- <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;">
- @if (Request["type"] != "detail")
- {
- @Html.ContextMenuBar("StuConfirm")
- }
- </div>
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.EvaluationStudentSettingID)
- @Html.HiddenFor(x => x.EducationMissionClassID)
- @Html.Hidden("evaluationStudentSettingID")
- <table cellpadding="0" cellspacing="0" id="evaluationstudenttable">
- <tr>
- <td style="color: red;">
- @Html.LabelFor(x => x.StudentNo):
- </td>
- <td>
- @Html.ComboGridFor(x => x.UserID, cgopStudent)
- </td>
- <td>
- @Html.LabelFor(x => x.Name):
- </td>
- <td>
- @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
- </td>
- </tr>
- <tr>
- <td style="color:red;">
- @Html.LabelFor(x => x.MissionClassName):
- </td>
- <td colspan="3">
- @Html.TextBoxFor(x => x.MissionClassName, new TextBoxOptions() { IsEnabled = false }, new Dictionary<string, string> { { "style", "width:92%;" } })
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.SchoolyearCode):
- </td>
- <td>
- @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
- {
- BindType = DropdownListBindType.PleaseSelect,
- TextField = "Text",
- ValueField = "Value",
- IsEnabled = false,
- ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
- })
- </td>
- <td>
- @Html.LabelFor(x => x.CollegeName):
- </td>
- <td>
- @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
- </td>
- </tr>
- <tr>
- <td style="color:red;">
- @Html.LabelFor(x => x.CourseName):
- </td>
- <td>
- @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
- </td>
- <td style="color:red;">
- @Html.LabelFor(x => x.DepartmentName):
- </td>
- <td>
- @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
- </td>
- </tr>
- <tr>
- <td style="color:red;">
- @Html.LabelFor(x => x.CourseTypeName):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID, new DropdownListOptions() { IsEnabled = false })
- </td>
- <td style="color:red;">
- @Html.LabelFor(x => x.TeachingModeID):
- </td>
- <td>
- @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, (x => x.TeachingModeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
|