EvaluationStudentEdit.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. @model EMIS.ViewModel.EvaluationManage.StudentEvaluation.EvaluationStudentSettingDetailView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "EvaluationStudentEdit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. //院系所
  8. ComboGridOptions cgopCollege = new ComboGridOptions
  9. {
  10. ID = "CollegeID",
  11. TextField = "Name",
  12. ValueField = "CollegeID",
  13. IsEnabled = false,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false,
  27. }
  28. };
  29. //教研室
  30. ComboGridOptions cgopDepartment = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "DepartmentID",
  34. IsEnabled = false,
  35. GridOptions = new DataGridOptions
  36. {
  37. Columns = new List<DataGridColumn>()
  38. {
  39. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  40. new BoundFieldColumn { FieldName="Name", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.2 },
  41. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CourseCollege"), Align=AlignStyle.Center, Width=0.2 }
  42. },
  43. PageSize = 5,
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Content("~/Department/List"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. //课程信息
  52. ComboGridOptions cgopCourse = new ComboGridOptions
  53. {
  54. ID = "CoursematerialID",
  55. TextField = "CourseName",
  56. ValueField = "CoursematerialID",
  57. IsEnabled = false,
  58. GridOptions = new DataGridOptions
  59. {
  60. Columns = new List<DataGridColumn>()
  61. {
  62. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  63. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 },
  64. new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" }
  65. },
  66. PageSize = 5,
  67. IsCheckOnSelect = true,
  68. DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID),
  69. IsPagination = true,
  70. IsShowRowNumbers = true,
  71. IsSingleSelect = false
  72. }
  73. };
  74. //学生信息
  75. ComboGridOptions cgopStudent = new ComboGridOptions
  76. {
  77. TextField = "StudentNo",
  78. ValueField = "UserID",
  79. OnSelect = "queryStudent",
  80. IsEnabled = isEnable,
  81. GridOptions = new DataGridOptions
  82. {
  83. Columns = new List<DataGridColumn>()
  84. {
  85. new LinkButtonColumn { FieldName="StudentNo", HeaderText="学号", Width=0.2, Align=AlignStyle.Center },
  86. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.08, Align=AlignStyle.Center },
  87. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StandardID", OverflowLength=6 },
  88. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Width=0.06, Align=AlignStyle.Center, OverflowLength=6 },
  89. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.1, Align=AlignStyle.Center, OverflowLength=6 },
  90. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", CustomFormatFun="SetRedColumn" }
  91. //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StudentStatus", CustomFormatFun="SetRedColumn" }
  92. },
  93. PageSize = 5,
  94. IsCheckOnSelect = true,
  95. DataSourceUrl = Url.Content("~/Student/StudentBaseInSchoolList?userID=" + Model.UserID),
  96. IsPagination = true,
  97. IsShowRowNumbers = true,
  98. IsSingleSelect = false
  99. }
  100. };
  101. }
  102. @section scripts{
  103. <script type="text/javascript">
  104. var nonSelect = "@DropdownList.SELECT_ALL";
  105. var mnu = "";
  106. //加载
  107. $(function () {
  108. mnu = $.SystemGeneral.getUrlParam("MNU");
  109. var evaluationStudentSettingID = top.$("#@(Request["WindowID"])").data("inputData");
  110. $("#evaluationStudentSettingID").val(evaluationStudentSettingID);
  111. });
  112. //设置列颜色为红色
  113. function SetRedColumn(index, row, value) {
  114. return " <span style=\"color: red;\">" + value + "</span>";
  115. }
  116. //学生信息
  117. function queryStudent(data) {
  118. var userID = $("#UserID").combogridX("getValue");
  119. if (userID == "" || userID == "-1" || userID == null) {
  120. $("#Name").val("");
  121. }
  122. else {
  123. $("#Name").val(data.Name);
  124. }
  125. }
  126. //确定
  127. function EvaluationStudentDetail_Confirm() {
  128. var evaluationStudentSettingID = document.getElementById("evaluationStudentSettingID").value;
  129. if (evaluationStudentSettingID == "" || evaluationStudentSettingID == "-1" || evaluationStudentSettingID == null) {
  130. $.messager.alert("系统提示", "数据有误,请核查。");
  131. return;
  132. }
  133. var userID = $("#UserID").combogridX("getValue");
  134. if (userID == "" || userID == "-1" || userID == null) {
  135. $.messager.alert("系统提示", "请选择要添加的学生。");
  136. return;
  137. }
  138. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/EvaluationStudentEdit', { evaluationStudentSettingID: evaluationStudentSettingID, userID: userID }, function (data) {
  139. if (data.IsSuccess) {
  140. $.messager.alert("系统提示", data.Message);
  141. $("#dgEvaluationStudentList").cmsXDataTable('load');
  142. } else {
  143. $.messager.alert("系统提示", data.Message);
  144. }
  145. });
  146. }
  147. </script>
  148. }
  149. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  150. @using (Ajax.BeginForm(new AjaxOptions
  151. {
  152. OnSuccess = "EMISFunction.FormSuccessNoClose",
  153. OnBegin = "EMISFunction.FormSubmit",
  154. OnComplete = "EMISFunction.FormComplete"
  155. }))
  156. {
  157. <div class="p_title">
  158. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  159. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  160. @if (Request["type"] != "detail")
  161. {
  162. @Html.ContextMenuBar("StuConfirm")
  163. }
  164. </div>
  165. </div>
  166. <div class="search_list">
  167. @Html.HiddenFor(x => x.EvaluationStudentSettingID)
  168. @Html.HiddenFor(x => x.EducationMissionClassID)
  169. @Html.Hidden("evaluationStudentSettingID")
  170. <table cellpadding="0" cellspacing="0" id="evaluationstudenttable">
  171. <tr>
  172. <td style="color: red;">
  173. @Html.LabelFor(x => x.StudentNo):
  174. </td>
  175. <td>
  176. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  177. </td>
  178. <td>
  179. @Html.LabelFor(x => x.Name):
  180. </td>
  181. <td>
  182. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
  183. </td>
  184. </tr>
  185. <tr>
  186. <td style="color:red;">
  187. @Html.LabelFor(x => x.MissionClassName):
  188. </td>
  189. <td colspan="3">
  190. @Html.TextBoxFor(x => x.MissionClassName, new TextBoxOptions() { IsEnabled = false }, new Dictionary<string, string> { { "style", "width:92%;" } })
  191. </td>
  192. </tr>
  193. <tr>
  194. <td>
  195. @Html.LabelFor(x => x.SchoolyearCode):
  196. </td>
  197. <td>
  198. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  199. {
  200. BindType = DropdownListBindType.PleaseSelect,
  201. TextField = "Text",
  202. ValueField = "Value",
  203. IsEnabled = false,
  204. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  205. })
  206. </td>
  207. <td>
  208. @Html.LabelFor(x => x.CollegeName):
  209. </td>
  210. <td>
  211. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  212. </td>
  213. </tr>
  214. <tr>
  215. <td style="color:red;">
  216. @Html.LabelFor(x => x.CourseName):
  217. </td>
  218. <td>
  219. @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  220. </td>
  221. <td style="color:red;">
  222. @Html.LabelFor(x => x.DepartmentName):
  223. </td>
  224. <td>
  225. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  226. </td>
  227. </tr>
  228. <tr>
  229. <td style="color:red;">
  230. @Html.LabelFor(x => x.CourseTypeName):
  231. </td>
  232. <td>
  233. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID, new DropdownListOptions() { IsEnabled = false })
  234. </td>
  235. <td style="color:red;">
  236. @Html.LabelFor(x => x.TeachingModeID):
  237. </td>
  238. <td>
  239. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, (x => x.TeachingModeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  240. </td>
  241. </tr>
  242. </table>
  243. </div>
  244. }
  245. </div>