@model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationProjectView @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 cgopEvaluationTarget = new ComboGridOptions { TextField = "Name", ValueField = "EvaluationTargetID", OnSelect = "queryEvaluationTarget", 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.2 }, new BoundFieldColumn { FieldName="EvaluationTableName", HeaderText="评价表名", Align=AlignStyle.Center, Width=0.12 }, new BoundFieldColumn { FieldName="EvaluationTypeName", HeaderText="评价类型", Align=AlignStyle.Center, Width=0.08 }, new BoundFieldColumn { FieldName="EvaluationNormName", HeaderText="评分标准", Align=AlignStyle.Center, Width=0.08 } }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/EvaluationTarget/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.EvaluationProjectID)
@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): @if (!isEnable) { @Html.TextAreaFor(x => x.Name, new Dictionary { { "style", "width: 90%;min-height: 60px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Name, new Dictionary { { "style", "width: 90%;min-height: 60px" } }) }
@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.EvaluationTargetName): @Html.ComboGridFor(x => x.EvaluationTargetID, cgopEvaluationTarget) @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: 35px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 35px" } }) }
}