@model EMIS.ViewModel.UniversityManage.SpecialtyClassManage.GrademajorView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; //院系专业 ComboGridOptions cgopFacultymajor = new ComboGridOptions { TextField = "Name", ValueField = "FacultymajorID", OnSelect = "queryFacultymajor", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new LinkButtonColumn { FieldName="Code", HeaderText="院系专业代码", Width=0.15, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="Name", HeaderText="院系专业名称", Width=0.25, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="EducationName", HeaderText=@EMIS.Utility.RSL.Get("EducationID"), Width=0.08, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Width=0.08, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Width=0.06, Align=AlignStyle.Center }, new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Width=0.1, Align=AlignStyle.Center } //new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Width=0.1, Align=AlignStyle.Center } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Facultymajor/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //院系所 ComboGridOptions cgopCollege = 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 } }; } @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.GrademajorID)
@Html.LabelFor(x => x.Code): @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Abbreviation): @Html.TextBoxFor(x => x.Abbreviation, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.GradeID): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.GradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.SemesterID): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Semester, (x => x.SemesterID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.FacultymajorID): @Html.ComboGridFor(x => x.FacultymajorID, cgopFacultymajor)
@Html.LabelFor(x => x.EducationName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.EducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false }) @Html.LabelFor(x => x.LearningformName): @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.LearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
@Html.LabelFor(x => x.LearnSystem): @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false }) @Html.LabelFor(x => x.CollegeName): @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
@Html.LabelFor(x => x.Professional): @if (!isEnable) { @Html.TextAreaFor(x => x.Professional, new Dictionary { { "style", "width: 90%;min-height: 20px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Professional, new Dictionary { { "style", "width: 90%;min-height: 20px" } }) }
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 60px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 60px" } }) }
}