@model EMIS.ViewModel.CultureplanManage.CourseMaterial.TeachTypeView @using Bowin.Web.Controls.Mvc; @using EMIS.Web.Controls; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; } @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.ClassGroupingID)
@Html.LabelFor(x => x.ClassName): @Html.TextBoxFor(x => x.ClassName, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:54%;" } })
@Html.LabelFor(x => x.TeachingModeIDListName): @if (!isEnable) { @Html.DataGrid(new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="TeachingModeID", HeaderText="类型代码", Align=AlignStyle.Center, Width=0.02 }, new BoundFieldColumn { FieldName="TeachingModeName", HeaderText="授课方式", Align=AlignStyle.Center, OrderFieldName="TeachingModeID", Width=0.02 }, new BoundFieldColumn { FieldName="IsDisplayName", HeaderText="是否显示", Align=AlignStyle.Center, OrderFieldName="IsDisplay", Width=0.02, CustomFormatFun="SetRedColumn" }, new CheckButtonColumn { FieldName = "IsDivide", HeaderText= "是否分班", Align=AlignStyle.Center, OrderFieldName="IsDivide", Width=0.02, EnableFieldName="false" } }, PageSize = 10, IsPostBack = true, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/TeachType/TeachingModeList?classGroupingID=" + Model.ClassGroupingID), ID = "dgTeachingModeList", IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, MaxHeight = 200 }) } else { @Html.DataGrid(new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="TeachingModeID", HeaderText="类型代码", Align=AlignStyle.Center, Width=0.02 }, new BoundFieldColumn { FieldName="TeachingModeName", HeaderText="授课方式", Align=AlignStyle.Center, OrderFieldName="TeachingModeID", Width=0.02 }, new BoundFieldColumn { FieldName="IsDisplayName", HeaderText="是否显示", Align=AlignStyle.Center, OrderFieldName="IsDisplay", Width=0.02, CustomFormatFun="SetRedColumn" }, new CheckButtonColumn { FieldName = "IsDivide", HeaderText= "是否分班", Align=AlignStyle.Center, OrderFieldName="IsDivide", Width=0.02 } }, PageSize = 10, IsPostBack = true, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/TeachType/TeachingModeList?classGroupingID=" + Model.ClassGroupingID), ID = "dgTeachingModeList", IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, MaxHeight = 200 }) }
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 45px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 45px" } }) }
}