@model EMIS.ViewModel.StudentManage.StudentChange.StudentChangeView @using Bowin.Web.Controls.Mvc; @using EMIS.Entities; @using EMIS.Web.Controls; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; var config = Request["isEnable"] != "false" ? true : false; //学生信息 ComboGridOptions cgopStudent = new ComboGridOptions { TextField = "StudentNo", ValueField = "UserID", OnSelect = "queryStudent", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { 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 = 10, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Student/StudentBaseInSchoolList?userID=" + Model.UserID), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //班级信息(异动前) ComboGridOptions cgopBeforeClassmajor = new ComboGridOptions { TextField = "Name", ValueField = "ClassmajorID", IsEnabled = false, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.2, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Classmajor/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //班级信息(异动后) ComboGridOptions cgopAfterClassmajor = new ComboGridOptions { TextField = "Name", ValueField = "ClassmajorID", OnSelect = "queryAfterClassmajor", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.2, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Classmajor/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //院系所(异动前) ComboGridOptions cgopBeforeCollege = new ComboGridOptions { 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.3 }, new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/College/ListOnlyCollege"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //院系所(异动后) ComboGridOptions cgopAfterCollege = new ComboGridOptions { TextField = "Name", ValueField = "CollegeID", OnSelect = "queryAfterCollege", IsEnabled = isEnable, 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 }, new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/College/ListOnlyCollege"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; } @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.StudentChangeID)
@Html.LabelFor(x => x.SchoolyearCode): @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions { TextField = "Text", ValueField = "Value", BindType = DropdownListBindType.PleaseSelect, IsEnabled = false, SelectedValue = BaseExtensions.GetCurrentSchoolYearID(), ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") }) @Html.LabelFor(x => x.ChangeTypeName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_ChangeType, (x => x.ChangeTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.StudentNo): @Html.ComboGridFor(x => x.UserID, cgopStudent) @Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
@Html.LabelFor(x => x.SexName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false }) @Html.LabelFor(x => x.ChangeReasonName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_ChangeReason, (x => x.ChangeReasonID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.ChangeDate): @Html.TextBoxFor(x => x.ChangeDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable }) @Html.LabelFor(x => x.ReturnSchoolyearCode): @Html.DropdownListFor((x => x.ReturnSchoolyearID), new DropdownListOptions { TextField = "Text", ValueField = "Value", BindType = DropdownListBindType.PleaseSelect, IsEnabled = isEnable, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") })
异动前信息
@Html.LabelFor(x => x.BeforeCollegeName): @Html.ComboGridFor(x => x.BeforeCollegeID, cgopBeforeCollege) @Html.LabelFor(x => x.BeforeGradeName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.BeforeGradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
@Html.LabelFor(x => x.BeforeStandardName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.BeforeStandardID), DropdownListBindType.PleaseSelect, new ComboGridOptions { IsEnabled = false, GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 } } } }) @Html.LabelFor(x => x.BeforeStandardCode): @Html.TextBoxFor(x => x.BeforeStandardCode, new TextBoxOptions() { IsEnabled = false })
@Html.LabelFor(x => x.BeforeEducationName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.BeforeEducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false }) @Html.LabelFor(x => x.BeforeLearningformName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.BeforeLearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
@Html.LabelFor(x => x.BeforeLearnSystem): @Html.TextBoxFor(x => x.BeforeLearnSystem, new TextBoxOptions() { IsEnabled = false }) @Html.LabelFor(x => x.BeforeClassmajorName): @Html.ComboGridFor(x => x.BeforeClassmajorID, cgopBeforeClassmajor)
@Html.LabelFor(x => x.BeforeInSchoolStatusName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.BeforeInSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false }) @Html.LabelFor(x => x.BeforeStudentStatusName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.BeforeStudentStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
异动后信息
@Html.LabelFor(x => x.AfterCollegeName): @Html.ComboGridFor(x => x.AfterCollegeID, cgopAfterCollege) @Html.LabelFor(x => x.AfterGradeName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.AfterGradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
@Html.LabelFor(x => x.AfterStandardName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.AfterStandardID), DropdownListBindType.PleaseSelect, new ComboGridOptions { IsEnabled = isEnable, OnSelect = "queryAfterStandard", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 } } } }) @Html.LabelFor(x => x.AfterStandardCode): @Html.TextBoxFor(x => x.AfterStandardCode, new TextBoxOptions() { IsEnabled = false })
@Html.LabelFor(x => x.AfterEducationName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.AfterEducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false }) @Html.LabelFor(x => x.AfterLearningformName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.AfterLearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
@Html.LabelFor(x => x.AfterLearnSystem): @Html.TextBoxFor(x => x.AfterLearnSystem, new TextBoxOptions() { IsEnabled = false }) @Html.LabelFor(x => x.AfterClassmajorName): @Html.ComboGridFor(x => x.AfterClassmajorID, cgopAfterClassmajor)
@Html.LabelFor(x => x.AfterInSchoolStatusName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.AfterInSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.AfterStudentStatusName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.AfterStudentStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Description): @if (!isEnable) { @Html.TextAreaFor(x => x.Description, new Dictionary { { "style", "width: 85%;min-height: 35px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Description, new Dictionary { { "style", "width: 85%;min-height: 35px" } }) }
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 85%;min-height: 25px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 85%;min-height: 25px" } }) }
}