123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- @model EMIS.ViewModel.ExaminationApply.OpenControlView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
- bool IsView = true;
- //if (Model.ExaminationOpenControlID != Guid.Empty && Model.ExaminationOpenControlID != null)
- //{
- // IsView = false;
- //}
- ListControlOptions lcop = new ListControlOptions
- {
- Name = "StudentTypeID",
- TextField = "Name",
- ValueField = "Value",
- ColumnCount = 4,
- IsEnabled = IsView,
- SelectedValueUrl = @Url.Content("~/ExaminationOpenControl/StudentType?openControlID=" + Model.ExaminationOpenControlID)
- };
- ComboGridOptions ExaminationSubject = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "ExaminationSubjectID",
- EmptyText="全部",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Width=0.1, Align=AlignStyle.Center },
- //new BoundFieldColumn { FieldName="ExaminationTypeName", HeaderText="考试类型", Width=0.1, Align=AlignStyle.Center },
- //new BoundFieldColumn { FieldName="ExaminationFormName", HeaderText="考试类别", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="科目名称", Width=0.1, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/ExaminationSubject/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- ComboGridOptions ExaminationSubjectEdit = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "ExaminationSubjectID",
- EmptyText = "请选择",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="ExaminationTypeName", HeaderText="考试类型", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="ExaminationFormName", HeaderText="考试类别", Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="科目名称", Width=0.1, Align=AlignStyle.Center }
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/ExaminationSubject/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
- @Html.HiddenFor(x => x.ExaminationOpenControlID)
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 开放控制信息
- </div>
- @if (Request["isView"] != "1")
- {
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
- }
- </div>
- <div class="search_list popupWindowContent">
- <table cellpadding="0" cellspacing="0" id="departmenttable">
- <tr>
- <td>@Html.LabelFor(x => x.ExaminationTypeID):
- </td>
- <td>@Html.DropdownListFor((x => x.ExaminationTypeID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/ExaminationType/DropdownList"), OnSelect = "queryExaminationSubject" })
- </td>
- @if (Model.ExaminationOpenControlID == null)
- {
- <td>@Html.LabelFor(x => x.ExaminationSubjectID):
- </td>
- <td>@Html.ComboGridFor(x => x.ExaminationSubjectID, ExaminationSubject)
- @*@Html.DropdownListFor((x => x.ExaminationSubjectID), new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/ExaminationSubject/DropdownList") })*@
- </td>
- }
- else
- {
- <td>@Html.LabelFor(x => x.ExaminationSubjectEditID):
- </td>
- <td>@Html.ComboGridFor(x => x.ExaminationSubjectEditID, ExaminationSubjectEdit)
- @*@Html.DropdownListFor((x => x.ExaminationSubjectEditID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/ExaminationSubject/DropdownList") })*@
- </td>
- }
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.StartDate):
- </td>
- <td>@Html.TextBoxFor(x => x.StartDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
- </td>
- <td>@Html.LabelFor(x => x.EndDate):
- </td>
- <td>@Html.TextBoxFor(x => x.EndDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.PeopleNumLimit):
- </td>
- <td>@Html.TextBoxFor(x => x.PeopleNumLimit, new TextBoxOptions() { })
- </td>
- <td>@Html.LabelFor(x => x.SchoolyearNumID):
- </td>
- <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, x => x.SchoolyearNumID)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.StudentTypeID):
- </td>
- <td colspan="3">@Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_STUDENTTYPE, lcop)
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
- @section scripts{
- <script type="text/javascript">
- function OpenControl_Save() {
- $(document.forms[0]).submit();
- }
-
- function queryExaminationSubject(data) {
- var id = $("#ExaminationOpenControlID").val()
- if (id == '') {
- $("#ExaminationSubjectID").combogridX("reload", eval("({'QueryParamsDatas':'ExaminationTypeDropdown|*|" + data.Value + "|@@|'})"));
- //$("#ExaminationSubjectID").combobox("reload", "/ExaminationSubject/DropdownList?bindType=1&examinationTypeID=" + data.Value + "");
- } else {
- $("#ExaminationSubjectEditID").combogridX("reload", eval("({'QueryParamsDatas':'ExaminationTypeDropdown|*|" + data.Value + "|@@|'})"));
- //$("#ExaminationSubjectEditID").combobox("reload", "/ExaminationSubject/DropdownList?bindType=0&examinationTypeID=" + data.Value + "");
- }
- }
- // $(function () { $("input[type='checkbox']").attr('disabled', "disabled"); });
- </script>
- }
|