@model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationTargetView @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", OnSelect = "queryEvaluationParticipateType", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.1, 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 cgopEvaluationTable = new ComboGridOptions { TextField = "Name", ValueField = "EvaluationTableID", OnSelect = "queryEvaluationTable", IsEnabled = isEnable, 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.25 }, //new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.12, OrderFieldName="ParticipateTypeID" }, //new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.1, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn" }, new BoundFieldColumn { FieldName="EvaluationTypeName", HeaderText="评价类型", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="IsEnabledName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, OrderFieldName="IsEnabled", CustomFormatFun="SetRedColumn" } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/EvaluationTable/GetEvaluationTableEnabledAndUseList?evaluationTableID=" + Model.EvaluationTableID), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; //评分标准 ComboGridOptions cgopEvaluationNorm = new ComboGridOptions { TextField = "Name", ValueField = "EvaluationNormID", IsEnabled = isEnable, GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Name", HeaderText="评分标准", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="NormTypeName", HeaderText="评分类型", Align=AlignStyle.Center, Width=0.08, OrderFieldName="NormTypeID", CustomFormatFun="SetRedColumn" }, new BoundFieldColumn { FieldName="NormDetailListName", HeaderText="标准明细", Align=AlignStyle.Center, Width=0.12, OrderFieldName="", CustomFormatFun="SetRedColumn" } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/EvaluationNorm/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.EvaluationTargetID)
@Html.LabelFor(x => x.OrderNo): @Html.TextBoxFor(x => x.OrderNo, new TextBoxOptions() { IsEnabled = isEnable }) @Html.LabelFor(x => x.Code): @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
@Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:90%;" } })
@Html.LabelFor(x => x.ParticipateTypeName): @Html.ComboGridFor(x => x.EvaluationParticipateTypeID, cgopEvaluationParticipateType) @Html.LabelFor(x => x.EvaluationTableName): @Html.ComboGridFor(x => x.EvaluationTableID, cgopEvaluationTable)
@Html.LabelFor(x => x.EvaluationNormName): @Html.ComboGridFor(x => x.EvaluationNormID, cgopEvaluationNorm) @Html.LabelFor(x => x.Weight): @Html.TextBoxFor(x => x.Weight, new TextBoxOptions() { IsEnabled = isEnable })
@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" } }) }
}