@model EMIS.ViewModel.ExaminationProjectView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @{ ViewBag.Title = "Edit"; ComboGridOptions cgopExamType = new ComboGridOptions { TextField = "Name", ValueField = "ExaminationTypeID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Name", HeaderText="考试类型名称", Align=AlignStyle.Center ,Width=0.4}, }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/ChargeProject/GetExaminationTypeList"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopProject = new ComboGridOptions { TextField = "Name", ValueField = "ExaminationProjectID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="ExaminationType", HeaderText="考试类型", Align=AlignStyle.Center ,Width=0.4}, new BoundFieldColumn { FieldName="Name", HeaderText="项目名称", Align=AlignStyle.Center ,Width=0.2} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/ChargeProject/GetProjectListViewGrid"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false }, }; ComboGridOptions cgopProjectSubject = new ComboGridOptions { TextField = "ExaminationSubject", ValueField = "ExaminationProjectSubjectID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="ExaminationSubject", HeaderText="考试科目", Align=AlignStyle.Center ,Width=0.1} }, PageSize = 5, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/ChargeProject/GetProjectSubjectListViewGrid"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = true }, }; ComboGridOptions cgopIssuedBy = new ComboGridOptions { TextField = "Name", ValueField = "Value", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="Name", HeaderText="发证机关", Align=AlignStyle.Center ,Width=0.1} }, PageSize = 5, DataSourceUrl = Url.Content("~/DictionaryItem/DictionItemList?DictionaryDropdown=EX_Issuer"), IsPagination = true, }, }; ListControlOptions lcoptm = new ListControlOptions { ID = "ProjectSubjects", Name = "ProjectSubjects", TextField = "ExaminationSubject", ValueField = "ExaminationProjectSubjectID", ColumnCount = 4, SelectedValues = Model.ProjectSubjects == null ? new List() : Model.ProjectSubjects }; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@if (Request.QueryString["Type"] != "1")//控制列表进入、屏蔽按钮权限 { @Html.ContextMenuBar("ProjectEdit") }
@Html.HiddenFor(x => x.ExaminationProjectID) @**@
@Html.LabelFor(x => x.Name): @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = true }, new Dictionary { { "style", "width:85%;" } })
@Html.LabelFor(x => x.ExaminationLevelID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EX_ExaminationLevel, (x) => x.ExaminationLevelID, new DropdownListOptions() { })
@Html.LabelFor(x => x.ExaminationTypeID): @Html.ComboGridFor(x => x.ExaminationTypeID, cgopExamType) @Html.LabelFor(x => x.IssuedByID): @Html.ComboGridFor(x => x.IssuedByID, cgopIssuedBy)
@Html.LabelFor(x => x.PreposeProjectID): @Html.ComboGridFor(x => x.PreposeProjectID, cgopProject)
@Html.LabelFor(x => x.ProjectSubjects): @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.EX_ExaminationSubject, lcoptm)
@Html.LabelFor(x => x.Remark): @Html.TextAreaFor(x => x.Remark, 5, 80, new Dictionary { { "style", "width:85%;" } })
@if (Request.QueryString["Type"] != "1")//控制列表进入、屏蔽按钮权限 { @Html.ContextMenuBar("EditList") } @Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn{ HeaderText="", FieldName="ExaminationSubjectID"}, new BoundFieldColumn { FieldName="ExaminationSubjectName", HeaderText="科目名称", Align=AlignStyle.Center, Width=0.06, }, new TextBoxColumn { FieldName="ResitCount", HeaderText="可补考次数", Align=AlignStyle.Center, Width=0.06, }, }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/ChargeProject/SubjectListByProjectID?projectID=" + Model.ExaminationProjectID), ID = "dgSubjectList", IsPagination = false, IsShowRowNumbers = false, IsSingleSelect = false, IsPostBack = true, })
}