CopyByGrade.cshtml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. @model EMIS.ViewModel.MinorManage.MinorPlanManage.MinorPlanApplyView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var DataRange = ViewBag.DataRange;
  7. ComboGridOptions cgopcollege = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "CollegeID",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Width=0.1, Align=AlignStyle.Center },
  16. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.3, Align=AlignStyle.Center }
  17. },
  18. IsCheckOnSelect = true,
  19. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  20. IsPagination = true,
  21. IsShowRowNumbers = true,
  22. IsSingleSelect = false
  23. }
  24. };
  25. if (DataRange != (int)EMIS.ViewModel.SYS_DataRange.All)
  26. {
  27. cgopcollege = new ComboGridOptions
  28. {
  29. TextField = "Name",
  30. ValueField = "CollegeID",
  31. IsEnabled = false,
  32. GridOptions = new DataGridOptions
  33. {
  34. Columns = new List<DataGridColumn>()
  35. {
  36. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Width=0.1, Align=AlignStyle.Center },
  37. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.3, Align=AlignStyle.Center }
  38. },
  39. IsCheckOnSelect = true,
  40. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  41. IsPagination = true,
  42. IsShowRowNumbers = true,
  43. IsSingleSelect = false
  44. }
  45. };
  46. }
  47. }
  48. @section scripts{
  49. <script type="text/javascript">
  50. var nonSelect = "@DropdownList.SELECT_ALL";
  51. function MinorPlanApplyGradeCopy_Confirm() {
  52. var BeForeYearID = $("#GrademajorBeForeYear").combobox("getValue");
  53. if (BeForeYearID == nonSelect) {
  54. $.messager.alert("系统提示", "请选择源年级!");
  55. return;
  56. }
  57. var AfterYearID = $("#GrademajorAfterYear").combobox("getValue");
  58. if (AfterYearID == nonSelect) {
  59. $.messager.alert("系统提示", "请选择目标年级!");
  60. return;
  61. }
  62. if (BeForeYearID > AfterYearID) {
  63. $.messager.alert("系统提示", "源年级要小于目标年级!");
  64. return;
  65. }
  66. $(document.forms[0]).submit();
  67. }
  68. </script>
  69. }
  70. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  71. @using (Ajax.BeginForm(new AjaxOptions
  72. {
  73. OnSuccess = "EMISFunction.FormSuccess",
  74. OnBegin = "EMISFunction.FormSubmit",
  75. OnComplete = "EMISFunction.FormComplete"
  76. }))
  77. {
  78. <div class="p_title">
  79. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("GradeCopy")</div>
  80. </div>
  81. <div class="search_list">
  82. @if (DataRange != (int)EMIS.ViewModel.SYS_DataRange.All)
  83. {
  84. @Html.HiddenFor(x => x.BeForeCollegeID)
  85. }
  86. <table cellpadding="0" cellspacing="0" id="planApplicationtable">
  87. <tr>
  88. <td style="width: 80px;">@Html.LabelFor(x => x.GrademajorBeForeYear):
  89. </td>
  90. <td>@Html.SchoolYearDropDownList(new DropdownListOptions
  91. {
  92. ID = "GrademajorBeForeYear",
  93. Name = "GrademajorBeForeYear",
  94. })
  95. </td>
  96. <td style="width: 80px;">@Html.LabelFor(x => x.BeForeCollegeID):
  97. </td>
  98. <td>@Html.ComboGridFor(x => x.BeForeCollegeID, cgopcollege)
  99. </td>
  100. </tr>
  101. <tr>
  102. <td style="width: 80px;">@Html.LabelFor(x => x.GrademajorAfterYear):
  103. </td>
  104. <td colspan="3">@Html.SchoolYearDropDownList(new DropdownListOptions
  105. {
  106. ID = "GrademajorAfterYear",
  107. Name = "GrademajorAfterYear",
  108. })
  109. </td>
  110. </tr>
  111. </table>
  112. </div>
  113. }
  114. </div>