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 + '/FinalExamination/GetStarttermID', { finalExaminationID: FinalExaminationID, UserID: UserID }, function (data) {
  42. $("#StarttermID").combobox("setValue", data.StarttermID)
  43. document.getElementById("UserName").value = data.UserName;
  44. });
  45. }
  46. function FinalExamination_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 + '/FinalExamination/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. OnBegin = "EMISFunction.FormSubmit",
  79. OnComplete = "EMISFunction.FormComplete"
  80. }))
  81. {
  82. @Html.Hidden("hid_ExamsCategory")
  83. <div class="p_title">
  84. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  85. 添加学生</div>*@
  86. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("StudentEdit")</div>
  87. </div>
  88. <div class="search_list">
  89. @Html.HiddenFor(x => x.ExamsCategoryID)
  90. @Html.HiddenFor(x => x.FinalExaminationID)
  91. @Html.HiddenFor(x=>x.isAutoAdd)
  92. <table cellpadding="0" cellspacing="0" id="FinalExaminationtable">
  93. <tr>
  94. <td>
  95. @Html.LabelFor(x=>x.UserID):
  96. </td>
  97. <td>
  98. @Html.ComboGridFor(x => x.UserID, cgop)
  99. </td>
  100. <td>
  101. @Html.LabelFor(x=>x.UserName):
  102. </td>
  103. <td>
  104. @Html.TextBoxFor(x => x.UserName, new TextBoxOptions { IsEnabled = false })
  105. </td>
  106. </tr>
  107. <tr>
  108. <td>
  109. @Html.LabelFor(x => x.SchoolyearID):
  110. </td>
  111. <td>
  112. @Html.TextBoxFor(x => x.SchoolyearCode, new TextBoxOptions { IsEnabled = false })
  113. @*@Html.DropdownListFor(x=>x.SchoolyearID,new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") })*@
  114. </td>
  115. <td>
  116. @Html.LabelFor(x=> x.StarttermID):
  117. </td>
  118. <td>
  119. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Startterm, (x => x.StarttermID))
  120. </td>
  121. </tr>
  122. <tr>
  123. <td>
  124. @Html.LabelFor(x => x.ExamsCategoryID):
  125. </td>
  126. <td>
  127. @Html.TextBoxFor(x => x.ExamsCategoryName, new TextBoxOptions { IsEnabled = false })
  128. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID, new DropdownListOptions { OnSelect = "QueryExamsCategory" })*@
  129. </td>
  130. <td>
  131. @Html.LabelFor(x => x.CourseTypeID):
  132. </td>
  133. <td>
  134. @Html.TextBoxFor(x => x.CourseTypeName, new TextBoxOptions { IsEnabled = false })
  135. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)*@
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>
  140. @Html.LabelFor(x => x.Credit):
  141. </td>
  142. <td>
  143. @Html.TextBoxFor(x => x.Credit, new TextBoxOptions { IsEnabled = false })
  144. </td>
  145. <td>
  146. @Html.LabelFor(x => x.ExaminationModeID):
  147. </td>
  148. <td>
  149. @Html.TextBoxFor(x => x.ExaminationModeName, new TextBoxOptions { IsEnabled = false })
  150. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, (x => x.ExaminationModeID))*@
  151. </td>
  152. </tr>
  153. @*<tr>
  154. <td>
  155. @Html.LabelFor(x => x.ClassName):
  156. </td>
  157. <td colspan="3">
  158. @Html.TextBoxFor(x => x.ClassName, new Dictionary<string, object> { { "style", "width:85%;" } })
  159. </td>
  160. </tr>*@
  161. </table>
  162. </div>
  163. }
  164. </div>