@model EMIS.ViewModel.ExamBatchProjectView @using EMIS.Web.Controls; @using EMIS.Entities; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; ComboGridOptions cgopSchoolYear = new ComboGridOptions { TextField = "Code", ValueField = "SchoolYearID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Code", HeaderText="学年学期", Align=AlignStyle.Center ,Width=0.2}, new BoundFieldColumn { FieldName="Years", HeaderText="学年", Align=AlignStyle.Center ,Width=0.2}, new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="学期", Align=AlignStyle.Center ,Width=0.2}, }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/SchoolYear/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false }, IsEnabled = Request.QueryString["Type"] == null, //OnSelect = "cgopSchoolYearSelect", OnChange = "cgopSchoolYearSelect", }; ComboGridOptions cgopBatchProject = new ComboGridOptions { TextField = "Name", ValueField = "ExaminationBatchID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Name", HeaderText="考试批次", Align=AlignStyle.Center ,Width=0.3} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/ExaminationBatch/GetProjectListViewGrid"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false }, Width = 300, IsEnabled=Request.QueryString["Type"] == null, OnSelect = "cgopBatchProjectSelect" }; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@if (Request.QueryString["Type"] != "1")//控制列表进入、屏蔽按钮权限 { @Html.ContextMenuBar("Edit") }
@if (Request.QueryString["Type"] != null)//非新增 { } @if (Request.QueryString["Type"] == null)//新增 { }
@Html.LabelFor(x => x.SchoolyearID): @Html.ComboGridFor(x => x.SchoolyearID, cgopSchoolYear)
@Html.LabelFor(x => x.ExaminationBatchID): @Html.ComboGridFor(x => x.ExaminationBatchID, cgopBatchProject)
@Html.LabelFor(x => x.StartDate): @Html.TextBoxFor(x => x.StartDate, new TextBoxOptions { TextBoxType = TextBoxType.Date }) @Html.LabelFor(x => x.EndDate): @Html.TextBoxFor(x => x.EndDate, new TextBoxOptions { TextBoxType = TextBoxType.Date })
@Html.LabelFor(x => x.Name): @Model.Name
@Html.LabelFor(x => x.SimulateTime): @Html.TextBoxFor(x => x.SimulateTime, new TextBoxOptions { }) @Html.LabelFor(x => x.Training): @Html.TextBoxFor(x => x.Training, new TextBoxOptions { })
@Html.LabelFor(x => x.TakeCourseTime): @Html.TextBoxFor(x => x.TakeCourseTime, new TextBoxOptions { }) @Html.LabelFor(x => x.MaxRegistCount): @Html.TextBoxFor(x => x.MaxRegistCount, new TextBoxOptions { })
@Html.LabelFor(x => x.Remark): @Html.TextAreaFor(x => x.Remark, new Dictionary { { "style", "width: 90%;min-height: 50px" } })
考试项目信息列表
@if (Request.QueryString["Type"] != "1") { @Html.ContextMenuBar("EditList") }
@Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn{ HeaderText="", FieldName="ExaminationProjectID"}, new BoundFieldColumn { FieldName="Name", HeaderText="项目名称", Align=AlignStyle.Center, Width=0.06, }, new BoundFieldColumn { FieldName="ExaminationType", HeaderText="考试类型", Align=AlignStyle.Center, Width=0.1 }, new TextBoxColumn { FieldName="SimulateTime", HeaderText="预考试时间", IsRequired=true,Align=AlignStyle.Center, Width=0.1 }, new TextBoxColumn { FieldName="Training", HeaderText="培训情况", IsRequired=true,Align=AlignStyle.Center, Width=0.1 }, new TextBoxColumn { FieldName="TakeCourseTime", HeaderText="预开课时间",IsRequired=true, Align=AlignStyle.Center, Width=0.1 }, new TextBoxColumn { FieldName="MaxRegistCount", Validator=new OnlyNumberValidator(){ Required=false}, HeaderText="最大报名人数", Align=AlignStyle.Center, Width=0.1 }, new TextBoxColumn { FieldName="Remark", HeaderText="需提交资料及注意事项", Align=AlignStyle.Center, Width=0.1 }, }, IsCheckOnSelect = true, //DataSourceUrl = Url.Content("~/ExamBatchProject/GetExamBatchProjectListEdiGrid"), ID = "dgProjectList", IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, IsPostBack = true, })
}