@model EMIS.ViewModel.ScoreManage.FinalExaminationView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; //判断新增或修改来选择提交后的处理方法 var OnSuccess = "EMISFunction.FormSuccessNoClose"; ComboGridOptions cgopdepartment = new ComboGridOptions { TextField = "Name", ValueField = "DepartmentID", GridOptions = new DataGridOptions { Columns = new List() { //new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.3 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Department/ListGridResultSet"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopcollege = new ComboGridOptions { TextField = "Name", ValueField = "CollegeID", //OnSelect = "QueryCollegeComboGridList", GridOptions = new DataGridOptions { Columns = new List() { //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.3 } }, //OnLoadSuccessFun = "queryClass", IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/College/ListOnlyCollege"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopClassmajor = new ComboGridOptions { TextField = "Name", ValueField = "ClassmajorID", OnSelect = "QueryComboGridClassmajor", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Classmajor/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopEnableCourse = new ComboGridOptions { TextField = "CourseName", ValueField = "CoursematerialID", OnSelect = "QueryComboGridCourse", GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.3 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Coursematerial/GetIsEnableCoursematerialView"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopEnableAndUseCourse = new ComboGridOptions { TextField = "CourseName", ValueField = "CoursematerialID", OnSelect = "QueryComboGridCourse", GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.3 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID="+Model.CoursematerialID), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopUser = new ComboGridOptions { TextField = "Name", ValueField = "UserID", GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.12 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/GetAllStaffDataBind"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopStandard = new ComboGridOptions { TextField = "StandardName", ValueField = "StandardID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.1 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, IsShowHeader = false } }; } @section scripts{ }
@if (Request["aType"] == "update") { OnSuccess = "EMISFunction.FormSuccess"; } @using (Ajax.BeginForm(new AjaxOptions { //保存后不关闭 OnSuccess = OnSuccess, //OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) { @Html.Hidden("hid_ExamsCategory")
@*
期末设定信息
*@ @if (Request["isView"] != "1") {
@Html.ContextMenuBar("Edit")
}
@Html.HiddenFor(x => x.FinalExaminationID) @Html.HiddenFor(x => x.ClassID) @if (Model.FinalExaminationID == null) { } else { } @**@ @**@
@Html.LabelFor(x => x.ClassName): @Html.TextBoxFor(x => x.ClassName, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.SchoolyearID): @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") }) @Html.LabelFor(x => x.CollegeID): @Html.ComboGridFor(x => x.CollegeID, cgopcollege)
@Html.LabelFor(x => x.GradeYearID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Grade, x => x.GradeYearID, new DropdownListOptions { OnLoadSuccess = "queryClass", OnSelect = "selectGrade" }) @Html.LabelFor(x => x.StandardName): @Html.ComboGridFor(x => x.StandardID, cgopStandard)
@Html.LabelFor(x => x.ClassmajorName): @Html.TextBoxFor(x => x.ClassmajorName, new Dictionary { { "style", "width:45%;" } })
@Html.LabelFor(x => x.CoursematerialID): @Html.ComboGridFor(x => x.CoursematerialID, cgopEnableCourse) @Html.LabelFor(x => x.CoursematerialID): @Html.ComboGridFor(x => x.CoursematerialID, cgopEnableAndUseCourse) @Html.LabelFor(x => x.CourseTypeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)
@Html.LabelFor(x => x.ExamsCategoryID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID, new DropdownListOptions { OnSelect = "QueryExamsCategory" }) @Html.LabelFor(x => x.DepartmentID): @Html.ComboGridFor(x => x.DepartmentID, cgopdepartment)
@Html.LabelFor(x => x.ResultTypeID) @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID)) @Html.LabelFor(x => x.Credit): @Html.TextBoxFor(x => x.Credit)
@Html.LabelFor(x => x.ExaminationModeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, (x => x.ExaminationModeID)) @Html.LabelFor(x => x.ExamsDatetime): @Html.TextBoxFor(x => x.ExamsDatetime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
@Html.LabelFor(x => x.IsEntry): @if (Model.IsEntry == true) { @Html.CheckBoxFor(x => x.IsEntry, new Dictionary { { "disabled", "true" } }) } else { @Html.CheckBoxFor(x => x.IsEntry) }
@Html.LabelFor(x => x.EntryDeadlineTime): @Html.TextBoxFor(x => x.EntryDeadlineTime, new TextBoxOptions { TextBoxType = TextBoxType.Date }) @Html.LabelFor(x => x.CreatorUserName): @Html.ComboGridFor(x => x.CreatorUserID, cgopUser)
@Html.LabelFor(x => x.isAutoAdd): @Html.CheckBoxFor(x => x.isAutoAdd) @Html.LabelFor(x => x.TotalHours): @Html.TextBoxFor(x => x.TotalHours)
@Html.ContextMenuBar("Settings")
@Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn { FieldName="UserID" }, new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, CustomFormatFun = "LoginIDColor",Width=0.08 }, new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, CustomFormatFun = "UserNameColor",Width=0.04 }, new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, CustomFormatFun = "SexNameColor",Width=0.03 }, new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialNameColor",Width=0.1 }, new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, CustomFormatFun = "ClassmajorNameColor",Width=0.1 }, new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, CustomFormatFun = "InSchoolStatusNameColor",Width=0.04 }, new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, CustomFormatFun = "StudentStatusNameColor",Width=0.04 }, new BoundFieldColumn { FieldName="IsDifferentDynamic", HeaderText="是否异动申请", Align=AlignStyle.Center, IsHidden = true } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/FinalExamination/FinalExaminationStudentList?finalExaminationID=" + Model.FinalExaminationID), IsPostBack = true, ID = "dgStudentList", IsPagination = false, IsShowRowNumbers = true, IsSingleSelect = false })
}