@model EMIS.ViewModel.Cultureplan.CoursematerialView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; //上课类型 ComboGridOptions cgopTeachType = new ComboGridOptions { TextField = "ClassName", ValueField = "ClassGroupingID", ID = "TeachTypeDropdown", Name = "TeachTypeDropdown", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="ClassName", HeaderText="上课类型", Align=AlignStyle.Center, Width=0.12 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/TeachType/List"), 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.CoursematerialID)
@Html.LabelFor(x => x.CourseCode): @Html.TextBoxFor(x => x.CourseCode, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.CourseName): @Html.TextBoxFor(x => x.CourseName, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Abbreviation): @Html.TextBoxFor(x => x.Abbreviation, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.EnglishName): @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.StandardName): @Html.TextBoxFor(x => x.StandardName, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.CourseEdition): @Html.TextBoxFor(x => x.CourseEdition, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.CourseLevelID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseLevel, (x => x.CourseLevelID), new DropdownListOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.CourseScienceID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseScience, (x => x.CourseScienceID), new DropdownListOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.ClassName): @Html.ComboGridFor(x => x.ClassGroupingID, cgopTeachType) @Html.LabelFor(x => x.IsEnable): @if (!isEnable) { @Html.CheckBoxFor(x => x.IsEnable, new Dictionary() { { "disabled", isEnable } }) } else { @Html.CheckBoxFor(x => x.IsEnable) }
@Html.LabelFor(x => x.CourseSynopsis): @if (!isEnable) { @Html.TextAreaFor(x => x.CourseSynopsis, new Dictionary { { "style", "width: 90%;min-height: 45px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.CourseSynopsis, new Dictionary { { "style", "width: 90%;min-height: 45px" } }) }
@Html.LabelFor(x => x.CourseReserve): @if (!isEnable) { @Html.TextAreaFor(x => x.CourseReserve, new Dictionary { { "style", "width: 90%;min-height: 40px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.CourseReserve, new Dictionary { { "style", "width: 90%;min-height: 40px" } }) }
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 30px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 30px" } }) }
}