@model EMIS.ViewModel.EducationManagement.ExecutablePlanView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; var isDisable = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true); var isOther = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? (Request["planType"] == "outside" ? true : false) : true); //年级专业 ComboGridOptions cgopGrademajor = new ComboGridOptions { TextField = "Name", ValueField = "GrademajorID", OnSelect = "queryGrademajor", IsEnabled = isDisable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.2 }, new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.4 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Grademajor/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //院系所 ComboGridOptions cgopCollege = new ComboGridOptions { ID = "CollegeID", TextField = "Name", ValueField = "CollegeID", IsEnabled = false, 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.2 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/College/ListOnlyCollege"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, } }; //课程信息 ComboGridOptions cgopCourse = new ComboGridOptions { ID = "CoursematerialID", TextField = "CourseName", ValueField = "CoursematerialID", IsEnabled = isDisable, 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.2 }, new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //教研室 ComboGridOptions cgopDepartment = new ComboGridOptions { TextField = "Name", ValueField = "DepartmentID", IsEnabled = isOther, 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.2 }, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CourseCollege"), Align=AlignStyle.Center, Width=0.2 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Department/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //授课方式 ListControlOptions lcoptm = new ListControlOptions { ID = "TeachingModeIDList", Name = "TeachingModeIDList", TextField = "Name", ValueField = "Value", ColumnCount = 4, IsEnabled = isEnable, SelectedValueUrl = @Url.Content("~/ExecutablePlan/TeachingModeTypeList?executablePlanID=" + Model.ExecutablePlanID) }; //授课地点 ListControlOptions lcoptp = new ListControlOptions { ID = "TeachingPlaceIDList", Name = "TeachingPlaceIDList", TextField = "Name", ValueField = "Value", ColumnCount = 4, IsEnabled = isEnable, SelectedValueUrl = @Url.Content("~/ExecutablePlan/TeachingPlaceList?executablePlanID=" + Model.ExecutablePlanID) }; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@if (Request["type"] != "detail") { @Html.ContextMenuBar("Edit") }
@Html.HiddenFor(x => x.ExecutablePlanID) @if (!isDisable) { }
@Html.LabelFor(x => x.SchoolyearCode): @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, TextField = "Text", ValueField = "Value", IsEnabled = isDisable, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") }) @Html.LabelFor(x => x.SourceTypeName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_SourceType, (x => x.SourceTypeID), new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.GrademajorName): @Html.ComboGridFor(x => x.GrademajorID, cgopGrademajor) @Html.LabelFor(x => x.GradeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.GradeID), new DropdownListOptions() { IsEnabled = false })
@Html.LabelFor(x => x.CollegeName): @Html.ComboGridFor(x => x.CollegeID, cgopCollege) @Html.LabelFor(x => x.StandardCode): @Html.TextBoxFor(x => x.StandardCode, new TextBoxOptions() { IsEnabled = false })
@Html.LabelFor(x => x.StandardName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.StandardID), new DropdownListOptions() { IsEnabled = false }) @Html.LabelFor(x => x.EducationID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), new DropdownListOptions() { IsEnabled = false })
@Html.LabelFor(x => x.LearningformID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), new DropdownListOptions() { IsEnabled = false }) @Html.LabelFor(x => x.LearnSystem): @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false })
@Html.LabelFor(x => x.CourseName): @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse) @Html.LabelFor(x => x.DepartmentName): @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
@Html.LabelFor(x => x.CourseStructureName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseStructure, x => x.CourseStructureID, new DropdownListOptions() { IsEnabled = isOther }) @Html.LabelFor(x => x.CourseCategoryName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseCategory, x => x.CourseCategoryID, new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.CourseTypeName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID, new DropdownListOptions() { IsEnabled = isOther }) @Html.LabelFor(x => x.CourseQualityName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseQuality, x => x.CourseQualityID, new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.PlanTypeName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_PlanType, x => x.PlanTypeID, new DropdownListOptions() { IsEnabled = false }) @Html.LabelFor(x => x.ExecuteStatusName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_ExecuteStatus, x => x.ExecuteStatus, new DropdownListOptions() { IsEnabled = false })
教学设置信息
@Html.LabelFor(x => x.Credit): @*@Html.TextBoxFor(x => x.Credit, new Dictionary { { "readOnly", "true" } })*@ @Html.TextBoxFor(x => x.Credit, new TextBoxOptions() { IsEnabled = isOther }) @Html.LabelFor(x => x.HandleModeName): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HandleMode, (x => x.HandleModeID), new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.TheoryCourse): @Html.TextBoxFor(x => x.TheoryCourse, new TextBoxOptions() { IsEnabled = isOther }) @Html.LabelFor(x => x.Practicehours): @Html.TextBoxFor(x => x.Practicehours, new TextBoxOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.Trialhours): @Html.TextBoxFor(x => x.Trialhours, new TextBoxOptions() { IsEnabled = isOther }) @Html.LabelFor(x => x.Totalhours): @Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
@Html.LabelFor(x => x.TheoryWeeklyNum): @Html.TextBoxFor(x => x.TheoryWeeklyNum, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.PracticeWeeklyNum): @Html.TextBoxFor(x => x.PracticeWeeklyNum, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.TrialWeeklyNum): @Html.TextBoxFor(x => x.TrialWeeklyNum, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.SchoolweeksNum): @Html.TextBoxFor(x => x.SchoolweeksNum, new TextBoxOptions { IsEnabled = false })
@Html.LabelFor(x => x.WeeklyHours): @Html.TextBoxFor(x => x.WeeklyHours, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.WeeklyNum): @Html.TextBoxFor(x => x.WeeklyNum, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.StartWeeklyNum): @Html.TextBoxFor(x => x.StartWeeklyNum, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.EndWeeklyNum): @Html.TextBoxFor(x => x.EndWeeklyNum, new TextBoxOptions() { IsEnabled = isEnable })
其它信息
@Html.LabelFor(x => x.IsSpecialtycore): @if (!isOther) { @Html.CheckBoxFor(x => x.IsSpecialtycore, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsSpecialtycore) } @Html.LabelFor(x => x.IsCooperation): @if (!isOther) { @Html.CheckBoxFor(x => x.IsCooperation, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsCooperation) }
@Html.LabelFor(x => x.IsRequired): @if (!isOther) { @Html.CheckBoxFor(x => x.IsRequired, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsRequired) } @Html.LabelFor(x => x.IsElective): @if (!isOther) { @Html.CheckBoxFor(x => x.IsElective, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsElective) }
@Html.LabelFor(x => x.IsNetworkCourse): @if (!isOther) { @Html.CheckBoxFor(x => x.IsNetworkCourse, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsNetworkCourse) } @Html.LabelFor(x => x.IsMainCourse): @if (!isOther) { @Html.CheckBoxFor(x => x.IsMainCourse, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsMainCourse) }
@Html.LabelFor(x => x.IsNeedMaterial): @if (!isOther) { @Html.CheckBoxFor(x => x.IsNeedMaterial, new Dictionary() { { "disabled", isOther } }) } else { @Html.CheckBoxFor(x => x.IsNeedMaterial) } @Html.LabelFor(x => x.CourseFineID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseFine, x => x.CourseFineID, new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.PracticeTypeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_PracticeType, x => x.PracticeTypeID, new DropdownListOptions() { IsEnabled = isOther }) @Html.LabelFor(x => x.TeachinglanguageID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Teachinglanguage, x => x.TeachinglanguageID, new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.ExaminationModeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, x => x.ExaminationModeID, new DropdownListOptions() { IsEnabled = true }) @Html.LabelFor(x => x.ResultTypeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID), new DropdownListOptions() { IsEnabled = isOther })
@Html.LabelFor(x => x.TeachingModeIDList): @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, lcoptm)
@Html.LabelFor(x => x.TeachingPlaceIDList): @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.EM_TeachingPlace, lcoptp)
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 15px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 15px" } }) }
}