StudentAdd.cshtml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. @model EMIS.ViewModel.ScoreManage.FinalExaminationView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. string type = ViewBag.type;
  7. ComboGridOptions cgop = new ComboGridOptions
  8. {
  9. TextField = "LoginID",
  10. ValueField = "UserID",
  11. EmptyText = "请选择",
  12. Name = "UserID",
  13. ID = "UserID",
  14. OnSelect = "SelectStarttermID",
  15. IsAutoComplete = true,
  16. MinReloadCharactor = EMIS.Utility.Const.LOCAL_SETTING_LoginIDLength,
  17. GridOptions = new DataGridOptions
  18. {
  19. Columns = new List<DataGridColumn>()
  20. {
  21. new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.3 },
  22. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 },
  23. },
  24. IsCheckOnSelect = true,
  25. DataSourceUrl = Url.Content("~/Students/List"),
  26. IsPagination = true,
  27. IsShowRowNumbers = true,
  28. IsSingleSelect = false
  29. }
  30. };
  31. }
  32. @section scripts{
  33. <script type="text/javascript">
  34. function SelectStarttermID() {
  35. var FinalExaminationID = $("#FinalExaminationID").val();
  36. var UserID = $("#UserID").combogridX("getValue");
  37. if (UserID == "" || UserID == -1) {
  38. $.messager.alert("系统提示", "请选择学号");
  39. return;
  40. }
  41. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ResitExamination/GetStarttermID', { finalExaminationID: FinalExaminationID, UserID: UserID }, function (data) {
  42. $("#StarttermID").combobox("setValue", data.StarttermID)
  43. document.getElementById("UserName").value = data.UserName;
  44. });
  45. }
  46. function ResitExamination_Save() {
  47. var FinalExaminationID = $("#FinalExaminationID").val();
  48. var UserID = $("#UserID").combogridX("getValue");
  49. var isAdd = $("#isAutoAdd").val();
  50. if (UserID == "" || UserID == -1) {
  51. $.messager.alert("系统提示", "请选择学号");
  52. return;
  53. }
  54. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ResitExamination/Verification', { finalExaminationID: FinalExaminationID, UserID: UserID }, function (data) {
  55. if (data == "不存在") {
  56. $(document.forms[0]).submit();
  57. }
  58. else {
  59. if (isAdd == "True") {
  60. $.messager.confirm("系统提示", "选择的学生已在录入名单中,是否修改?", function (r) {
  61. if (r) {
  62. $(document.forms[0]).submit();
  63. }
  64. });
  65. }
  66. else {
  67. $(document.forms[0]).submit();
  68. }
  69. }
  70. });
  71. }
  72. </script>
  73. }
  74. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  75. @using (Ajax.BeginForm(new AjaxOptions
  76. {
  77. //OnSuccess = "EMISFunction.FormSuccess",
  78. //保存后不关闭页面
  79. OnSuccess = "EMISFunction.FormSuccessNoClose",
  80. OnBegin = "EMISFunction.FormSubmit",
  81. OnComplete = "EMISFunction.FormComplete"
  82. }))
  83. {
  84. @Html.Hidden("hid_ExamsCategory")
  85. <div class="p_title">
  86. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  87. 添加学生</div>*@
  88. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("StudentEdit")</div>
  89. </div>
  90. <div class="search_list">
  91. @Html.HiddenFor(x => x.ExamsCategoryID)
  92. @Html.HiddenFor(x => x.FinalExaminationID)
  93. @Html.HiddenFor(x=>x.isAutoAdd)
  94. <table cellpadding="0" cellspacing="0" id="FinalExaminationtable">
  95. <tr>
  96. <td>
  97. @Html.LabelFor(x=>x.UserID):
  98. </td>
  99. <td>
  100. @Html.ComboGridFor(x => x.UserID, cgop)
  101. </td>
  102. <td>
  103. @Html.LabelFor(x=>x.UserName):
  104. </td>
  105. <td>
  106. @Html.TextBoxFor(x => x.UserName, new TextBoxOptions { IsEnabled = false })
  107. </td>
  108. </tr>
  109. <tr>
  110. <td>
  111. @Html.LabelFor(x => x.SchoolyearID):
  112. </td>
  113. <td>
  114. @Html.TextBoxFor(x => x.SchoolyearCode, new TextBoxOptions { IsEnabled = false })
  115. @*@Html.DropdownListFor(x=>x.SchoolyearID,new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") })*@
  116. </td>
  117. <td>
  118. @Html.LabelFor(x=> x.StarttermID):
  119. </td>
  120. <td>
  121. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Startterm, (x => x.StarttermID))
  122. </td>
  123. </tr>
  124. <tr>
  125. <td>
  126. @Html.LabelFor(x => x.ExamsCategoryID):
  127. </td>
  128. <td>
  129. @Html.TextBoxFor(x => x.ExamsCategoryName, new TextBoxOptions { IsEnabled = false })
  130. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID, new DropdownListOptions { OnSelect = "QueryExamsCategory" })*@
  131. </td>
  132. <td>
  133. @Html.LabelFor(x => x.CourseTypeID):
  134. </td>
  135. <td>
  136. @Html.TextBoxFor(x => x.CourseTypeName, new TextBoxOptions { IsEnabled = false })
  137. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)*@
  138. </td>
  139. </tr>
  140. <tr>
  141. <td>
  142. @Html.LabelFor(x => x.Credit):
  143. </td>
  144. <td>
  145. @Html.TextBoxFor(x => x.Credit, new TextBoxOptions { IsEnabled = false })
  146. </td>
  147. <td>
  148. @Html.LabelFor(x => x.ExaminationModeID):
  149. </td>
  150. <td>
  151. @Html.TextBoxFor(x => x.ExaminationModeName, new TextBoxOptions { IsEnabled = false })
  152. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, (x => x.ExaminationModeID))*@
  153. </td>
  154. </tr>
  155. @*<tr>
  156. <td>
  157. @Html.LabelFor(x => x.ClassName):
  158. </td>
  159. <td colspan="3">
  160. @Html.TextBoxFor(x => x.ClassName, new Dictionary<string, object> { { "style", "width:85%;" } })
  161. </td>
  162. </tr>*@
  163. </table>
  164. </div>
  165. }
  166. </div>