123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- @model EMIS.ViewModel.EducationManage.EducationMissionOpenControlView
- @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);
-
- //院系所
- ComboGridOptions cgop = new ComboGridOptions
- {
- TextField = "Name",
- ValueField = "CollegeID",
- IsEnabled = isDisable,
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Width=0.1, Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.3, Align=AlignStyle.Center }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
- 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" }))
- {
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- @if (Request["type"] != "detail")
- {
- @Html.ContextMenuBar("Edit")
- }
- </div>
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.EducationMissionOpenControlID)
- <table cellpadding="0" cellspacing="0" id="collegePrioritytable">
- <tr>
- <td style="color: red;">
- @Html.LabelFor(x => x.SchoolyearCode):
- </td>
- <td>
- @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
- {
- BindType = DropdownListBindType.PleaseSelect,
- TextField = "Text",
- ValueField = "Value",
- IsEnabled = isDisable,
- ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
- })
- </td>
- <td style="color: red;">
- @Html.LabelFor(x => x.CollegeName):
- </td>
- <td>
- @Html.ComboGridFor(x => x.CollegeID, cgop)
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.StartDate):
- </td>
- <td>
- @Html.TextBoxFor(x => x.StartDate, new TextBoxOptions
- {
- TextBoxType = TextBoxType.Date,
- IsEnabled = isEnable
- })
- </td>
- <td>
- @Html.LabelFor(x => x.EndDate):
- </td>
- <td>
- @Html.TextBoxFor(x => x.EndDate, new TextBoxOptions
- {
- TextBoxType = TextBoxType.Date,
- IsEnabled = isEnable
- })
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
- @section scripts{
- <script type="text/javascript">
- //保存
- function EduOpenControl_Save() {
- var startDate = $("#StartDate").val();
- var endDate = $("#EndDate").val();
- var sd = new Date(startDate.replace(/\-/g, "\/"));
- var ed = new Date(endDate.replace(/\-/g, "\/"));
- if (startDate != "" && endDate != "" && sd >= ed) {
- $.messager.alert("系统提示", "结束日期不能小于开始日期。");
- return;
- }
- $(document.forms[0]).submit();
- }
- </script>
- }
|