123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 |
- @model EMIS.ViewModel.SelectCourse.OptionalCourseSettingView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
- bool IsEnabled = true;
- if (Request["type"] != "add")
- {
- IsEnabled = false;
- }
- ComboGridOptions cgop = new ComboGridOptions
- {
- TextField = "StandardName",
- ValueField = "StandardID",
- OnSelect = "queryClass",
- IsEnabled = IsEnabled,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 },
- new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
- new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.2 },
- new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.2 }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Specialty/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopGrademajor = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "GrademajorID",
- IsEnabled = IsEnabled,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Width=0.2, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Width=0.08, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Width=0.2, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Grademajor/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopClassmajor = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "ClassmajorID",
- OnSelect = "QueryClassmajor",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.1, Align=AlignStyle.Center }
- },
- //OnLoadSuccessFun="QueryClassmajor",
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/OptionalCourseSetting/Class?GrademajorID=" + Model.GrademajorID),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopCourse = new ComboGridOptions
- {
- TextField = "CourseName",
- ValueField = "CoursematerialID",
- OnSelect = "CoursematerialSelect",
- IsEnabled = IsEnabled,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.3, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/OptionalCoursePlan/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions cgopDepartment = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "DepartmentID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.3 }
- //new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 }
- //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.3 }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/Department/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ListControlOptions lcop = new ListControlOptions
- {
- Name = "TeachingModeID",
- TextField = "Name",
- ValueField = "Value",
- ColumnCount = 4,
- SelectedValueUrl = @Url.Content("~/OptionalCourseSetting/TeachingModeType?ExecutableOptionalCourseID=" + Model.ExecutableOptionalCourseID)
- };
- ListControlOptions lcoptp = new ListControlOptions
- {
- Name = "TeachingPlaceID",
- TextField = "Name",
- ValueField = "Value",
- ColumnCount = 4,
- SelectedValueUrl = @Url.Content("~/SpecialtyCourse/TeachingPlace?specialtyCourseID=" + Model.SpecialtyCourseID)
- };
- }
- @section scripts{
- <script src="~/Scripts/Business/SelectCourseManage/OptionalCourseSettingEdit.js" type="text/javascript"></script>
- <script type="text/javascript">
- var NotOpenStatus = "@EMIS.ViewModel.EM_SelectCourseResultStatus.NotOpen";
- var CreatedStatus = "@EMIS.ViewModel.EM_SelectCourseResultStatus.Created";
- var OpenedStatus = "@EMIS.ViewModel.EM_SelectCourseResultStatus.Opened";
- var nonSelect = "@DropdownList.SELECT_ALL";
- function OptionalCourseSetting_Save() {
- var teacherViewList = $("#dgTeacherList").cmsXDataTable("getRows");
- for (var i = 0; i < teacherViewList.length; i++) {
- if (teacherViewList[i].TeachingMethod == null || teacherViewList[i].TeachingMethod == -1) {
- $.messager.alert('系统信息', "请选择授课老师的任课方式!");
- return;
- }
- }
- var classViewList = $("#dgClassList").cmsXDataTable("getRows");
- if (classViewList.length <= 0) {
- $.messager.alert('系统信息', "请在开放范围选择班级!");
- return;
- }
- if (parseInt($("#PeopleNumlower").val()) > parseInt($("#PeopleNumlimit").val())) {
- $.messager.alert("系统信息", "人数上限不能小于下限。");
- return;
- }
- if (!isNaN($("#Trialhours").val()) && $("#Trialhours").val() != ""
- && !isNaN($("#Practicehours").val()) && $("#Practicehours").val() != ""
- && parseFloat($("#Trialhours").val()) > parseFloat($("#Practicehours").val())) {
- $.messager.alert("系统提示", "实验学时不能大于实践学时。");
- return;
- }
- if (!isNaN($("#TrialWeeklyNum").val()) && $("#TrialWeeklyNum").val() != ""
- && !isNaN($("#PracticeWeeklyNum").val()) && $("#PracticeWeeklyNum").val() != ""
- && parseFloat($("#TrialWeeklyNum").val()) > parseFloat($("#PracticeWeeklyNum").val())) {
- $.messager.alert("系统提示", "实验周次不能大于实践周次。");
- return;
- }
- $(document.forms[0]).submit();
- }
-
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- 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;" id="btnSave">@Html.ContextMenuBar("Create")</div>
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.ExecutableOptionalCourseID)
- @Html.HiddenFor(x => x.OptionalCourseID)
- @Html.HiddenFor(x => x.RecordStatusName)
- @Html.HiddenFor(x => x.RecordStatus)
- <table cellpadding="0" cellspacing="0" id="specialtyCourseable">
- <tr>
- @*<td>
- @Html.LabelFor(x => x.DefaultClassName):
- </td>
- <td>
- @Html.ComboGridFor(x => x.ClassmajorID, cgopClassmajor)
- </td>
- *@
- <td>
- @Html.LabelFor(x => x.DefaultClassName):
- </td>
- <td colspan="3">
- @Html.TextBoxFor(x => x.DefaultClassName, new Dictionary<string, object> { { "style", "width:85%;" } })
- </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",
- ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"),
- SelectedValue = BaseExtensions.GetCurrentSchoolYearID()
- })
- </td>
- @*<td
- >@Html.LabelFor(x => x.SchoolYearCode):
- </td>
- <td>
- @Html.TextBoxFor(x => x.SchoolYearCode, new TextBoxOptions { IsEnabled = false })
- </td>*@
- <td>@Html.LabelFor(x => x.Grade):
- </td>
- <td>@Html.SchoolYearDropDownListFor(x => x.GradeID, new DropdownListOptions { OnSelect = "queryClass" })</td>
- @*<td>@Html.LabelFor(x => x.Grade):, new DropdownListOptions { OnSelect = "SchoolyearDictionaryDropDown" }
- </td>
- <td>
- @Html.TextBoxFor(x => x.Grade, new TextBoxOptions { IsEnabled = false })
- </td>*@
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.StandardDesc):
- </td>
- <td>@Html.ComboGridFor(x => x.StandardID, cgop)
- </td>
- <td>@Html.LabelFor(x => x.GrademajorName):
- </td>
- <td>@Html.ComboGridFor(x => x.GrademajorID, cgopGrademajor)
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.CourseName):
- </td>
- <td colspan="3">
- @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.SchoolyearNumID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, x => x.SchoolyearNumID, new DropdownListOptions { IsEnabled = false })
- @Html.HiddenFor(x => x.SchoolyearNumID)
- </td>
- <td>@Html.LabelFor(x => x.SchoolcodeID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Semester, x => x.SchoolcodeID, new DropdownListOptions { IsEnabled = false })
- @Html.HiddenFor(x => x.SchoolcodeID)
- </td>
- @*<td>@Html.LabelFor(x => x.SchoolyearNumID):
- </td>
- <td>@Html.TextBoxFor(x => x.SchoolyearNumName, new TextBoxOptions { IsEnabled = false })
- @Html.HiddenFor(x => x.SchoolyearNumName)
- @Html.HiddenFor(x => x.SchoolyearNumID)
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, x => x.SchoolyearNumID)
- </td>
- <td>@Html.LabelFor(x => x.SchoolcodeID):
- </td>
- <td>@Html.TextBoxFor(x => x.SchoolcodeName, new TextBoxOptions { IsEnabled = false })
- @Html.HiddenFor(x => x.SchoolcodeName)
- @Html.HiddenFor(x => x.SchoolcodeID)
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Schoolcode, x => x.SchoolcodeID)
- </td>*@
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.CourseTypeID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)
- </td>
- <td>
- @Html.LabelFor(x => x.DepartmentID):
- </td>
- <td>
- @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
- </td>
-
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.CourseStructureID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseStructure, x => x.CourseStructureID)
- </td>
- <td>
- @Html.LabelFor(x => x.CourseCategoryID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseCategory, x => x.CourseCategoryID)
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.CourseQualityID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseQuality, x => x.CourseQualityID)
- </td>
- <td>
- @Html.LabelFor(x => x.TeachinglanguageID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Teachinglanguage, x => x.TeachinglanguageID)
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.ExaminationModeID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, x => x.ExaminationModeID)
- </td>
- <td>@Html.LabelFor(x => x.ResultTypeID)
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID))
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.PracticeTypeID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_PracticeType, x => x.PracticeTypeID)
- </td>
- <td>
- @Html.LabelFor(x => x.PeopleNumlower):
- </td>
- <td>
- @Html.TextBoxFor(x => x.PeopleNumlower)
- </td>
- </tr>
- @*<tr>
- <td>@Html.LabelFor(x => x.IsEnable):
- </td>
- <td>@Html.CheckBoxFor(x => x.IsEnable, (Model.IsEnable))
- </td>
- <td>@Html.LabelFor(x => x.IsOpened):
- </td>
- <td>@Html.CheckBoxFor(x => x.IsOpened, (Model.IsOpened))
- </td>
- <td></td><td></td>
- </tr>*@
- <tr>
- <td>
- @Html.LabelFor(x => x.Credit):
- </td>
- <td>
- @Html.TextBoxFor(x => x.Credit)
- </td>
- <td>
- @Html.LabelFor(x => x.PeopleNumlimit):
- </td>
- <td>
- @Html.TextBoxFor(x => x.PeopleNumlimit)
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.TheoryCourse):
- </td>
- <td>
- @Html.TextBoxFor(x => x.TheoryCourse)
- </td>
- <td>@Html.LabelFor(x => x.Practicehours):
- </td>
- <td>@Html.TextBoxFor(x => x.Practicehours)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.Trialhours):
- </td>
- <td>@Html.TextBoxFor(x => x.Trialhours)
- </td>
- <td>@Html.LabelFor(x => x.Totalhours):
- </td>
- <td>@Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <div id="weekExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
- background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0;"
- onclick="swapWeekSettings();">
- </div>
- <div style="float: left; cursor: pointer; color: red;" onclick="swapWeekSettings();">
- 上课周次信息
- </div>
- </td>
- </tr>
- <tr style="display: ">
- <td>@Html.LabelFor(x => x.TheoryWeeklyNum):
- </td>
- <td>@Html.TextBoxFor(x => x.TheoryWeeklyNum)
- </td>
- <td>@Html.LabelFor(x => x.PracticeWeeklyNum):
- </td>
- <td>@Html.TextBoxFor(x => x.PracticeWeeklyNum)
- </td>
- </tr>
- <tr style="display: ">
- <td>@Html.LabelFor(x => x.TrialWeeklyNum):
- </td>
- <td>@Html.TextBoxFor(x => x.TrialWeeklyNum)
- </td>
- <td>@Html.LabelFor(x => x.SchoolweeksNum):
- </td>
- <td>@Html.TextBoxFor(x => x.SchoolweeksNum, new TextBoxOptions { IsEnabled = false })
- </td>
- </tr>
- <tr style="display: ">
- <td>@Html.LabelFor(x => x.StartWeeklyNum):
- </td>
- <td>@Html.TextBoxFor(x => x.StartWeeklyNum)
- </td>
- <td>@Html.LabelFor(x => x.EndWeeklyNum):
- </td>
- <td>@Html.TextBoxFor(x => x.EndWeeklyNum)
- </td>
- </tr>
- <tr style="display: ">
- <td>@Html.LabelFor(x => x.WeeklyHours):
- </td>
- <td>@Html.TextBoxFor(x => x.WeeklyHours)
- </td>
- <td>@Html.LabelFor(x => x.WeeklyNum):
- </td>
- <td>@Html.TextBoxFor(x => x.WeeklyNum)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.TeachingModeID):
- </td>
- <td colspan="3">@Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, lcop)
- </td>
- </tr>
- <tr>
- <td>
- <label>
- 开放范围:
- </label>
- </td>
- <td colspan="3">
- @Html.ContextMenuBar("Edit-ClassGrid")
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="ClassmajorID" },
- new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.06 },
- new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
- new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03 }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/OptionalCourseSetting/ClassList?executableOptionalCourseID=" + Model.ExecutableOptionalCourseID),
- IsPostBack = true,
- ID = "dgClassList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- MaxHeight = 110
- })
- </td>
- </tr>
- <tr>
- <td>
- <label>
- 授课老师:
- </label>
- </td>
- <td colspan="3">
- @Html.ContextMenuBar("Edit-TeacherGrid")
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn { FieldName="UserID" },
- new BoundFieldColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.04 },
- new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
- new DictionaryDropdownListColumn { FieldName="TeachingMethod", HeaderText="任课方式", Align=AlignStyle.Center, Width=0.04,
- DictionaryType = EMIS.ViewModel.DictionaryItem.EM_TeachingMethod }
- },
- PageSize = 3,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/OptionalCourseSetting/TeacherList?executableOptionalCourseID=" + Model.ExecutableOptionalCourseID),
- IsPostBack = true,
- ID = "dgTeacherList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- MaxHeight = 65
- })
- </td>
- </tr>
- @*<tr>
- <td colspan="3">
- @Html.CheckList(lcop)
- </td>
- </tr>
- *@
- @* <tr>
- <td>@Html.LabelFor(x => x.Totalhours):
- </td>
- <td>@Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
- </td>
- </tr>*@
- <tr>
- <td>@Html.LabelFor(x => x.Remarks):
- </td>
- <td colspan="3">@Html.TextAreaFor(x => x.Remarks, new Dictionary<string, object> { { "style", "width:85%;" } })
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
|