@model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationTableView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; //参评类型 ComboGridOptions cgopEvaluationParticipateType = new ComboGridOptions { TextField = "ParticipateTypeName", ValueField = "EvaluationParticipateTypeID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.12, OrderFieldName="ParticipateTypeID" }, new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.08, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn"} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/EvaluationParticipateType/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //评价类型 ComboGridOptions cgopEvaluationType = new ComboGridOptions { TextField = "Name", ValueField = "EvaluationIntTypeID", OnSelect = "queryEvaluationType", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Code", HeaderText="编号", Align=AlignStyle.Center, Width=0.08 }, new BoundFieldColumn { FieldName="Name", HeaderText="名称", Align=AlignStyle.Center, Width=0.12 }, new BoundFieldColumn { FieldName="TeachingModeIDListName", HeaderText="授课方式", Align=AlignStyle.Center, Width=0.15, OrderFieldName="", CustomFormatFun="SetRedColumn" } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/EvaluationIntType/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.EvaluationTableID)
@Html.LabelFor(x => x.ParticipateTypeName): @Html.ComboGridFor(x => x.EvaluationParticipateTypeID, cgopEvaluationParticipateType) @Html.LabelFor(x => x.EvaluationTypeName): @Html.ComboGridFor(x => x.EvaluationTypeID, cgopEvaluationType)
@Html.LabelFor(x => x.Code): @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.TeachingModeIDListName): @Html.TextBoxFor(x => x.TeachingModeIDListName, new TextBoxOptions() { IsEnabled = false })
@Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:90%;" } })
@Html.LabelFor(x => x.Weight): @Html.TextBoxFor(x => x.Weight, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.IsEnabledName): @if (!isEnable) { @Html.CheckBoxFor(x => x.IsEnabled, new Dictionary() { { "disabled", isEnable } }) } else { @Html.CheckBoxFor(x => x.IsEnabled) }
@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" } }) }
}