@model EMIS.ViewModel.EvaluationManage.EvaluationSetting.EvaluationTypeView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; var isEnable = Request["type"] == "detail" ? false : true; var isDisable = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? 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.EvaluationTypeID)
@Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary { { "style", "width:65%;" } })
@Html.LabelFor(x => x.IsStudent): @if (!isEnable) { @Html.CheckBoxFor(x => x.IsStudent, new Dictionary() { { "disabled", isEnable } }) } else { @Html.CheckBoxFor(x => x.IsStudent) } @Html.LabelFor(x => x.Number): @Html.TextBoxFor(x => x.Number, new TextBoxOptions { IsEnabled = isEnable })
@Html.LabelFor(x => x.StartTime): @Html.TextBoxFor(x => x.StartTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime, IsEnabled = isEnable }) @Html.LabelFor(x => x.EndTime): @Html.TextBoxFor(x => x.EndTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime, IsEnabled = isEnable })
@Html.LabelFor(x => x.Remark): @if (!isEnable) { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 20px" }, { "disabled", "true" } }) } else { @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 20px" } }) }
}