Edit.cshtml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. @model EMIS.ViewModel.ScoreManage.LevelScoreManage.LevelScoreView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @{
  6. ViewBag.Title = "Edit";
  7. var isEnable = Request["type"] == "detail" ? false : true;
  8. //学生信息
  9. ComboGridOptions cgopStudent = new ComboGridOptions
  10. {
  11. TextField = "StudentNo",
  12. ValueField = "UserID",
  13. OnSelect = "queryStudent",
  14. IsEnabled = isEnable,
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. new LinkButtonColumn { FieldName="StudentNo", HeaderText="学号", Width=0.2, Align=AlignStyle.Center },
  20. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.08, Align=AlignStyle.Center },
  21. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Width=0.06, Align=AlignStyle.Center, OrderFieldName="SexID" },
  22. //new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StandardID", OverflowLength=6 },
  23. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Width=0.06, Align=AlignStyle.Center, OverflowLength=6 },
  24. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.1, Align=AlignStyle.Center, OverflowLength=6 },
  25. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", CustomFormatFun="SetRedColumn" }
  26. //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StudentStatus", CustomFormatFun="SetRedColumn" }
  27. },
  28. PageSize = 10,
  29. IsCheckOnSelect = true,
  30. DataSourceUrl = Url.Content("~/Student/StudentBaseAllList?userID=" + Model.UserID),
  31. IsPagination = true,
  32. IsShowRowNumbers = true,
  33. IsSingleSelect = false
  34. }
  35. };
  36. //班级信息
  37. ComboGridOptions cgopClassmajor = new ComboGridOptions
  38. {
  39. TextField = "Name",
  40. ValueField = "ClassmajorID",
  41. IsEnabled = false,
  42. GridOptions = new DataGridOptions
  43. {
  44. Columns = new List<DataGridColumn>()
  45. {
  46. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.2, Align=AlignStyle.Center },
  47. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center }
  48. },
  49. PageSize = 5,
  50. IsCheckOnSelect = true,
  51. DataSourceUrl = Url.Content("~/Classmajor/List"),
  52. IsPagination = true,
  53. IsShowRowNumbers = true,
  54. IsSingleSelect = false
  55. }
  56. };
  57. //考试科目
  58. ComboGridOptions cgopExaminationSubject = new ComboGridOptions
  59. {
  60. TextField = "Name",
  61. ValueField = "ExaminationSubjectID",
  62. IsEnabled = isEnable,
  63. GridOptions = new DataGridOptions
  64. {
  65. Columns = new List<DataGridColumn>()
  66. {
  67. new LinkButtonColumn { FieldName="Name", HeaderText="考试科目", Width=0.35, Align=AlignStyle.Center }
  68. },
  69. PageSize = 5,
  70. IsCheckOnSelect = true,
  71. DataSourceUrl = Url.Content("~/ExaminationSubject/List"),
  72. IsPagination = true,
  73. IsShowRowNumbers = true,
  74. IsSingleSelect = false
  75. }
  76. };
  77. }
  78. @section scripts{
  79. <script src="~/Scripts/Business/ScoreManage/LevelScoreManage/LevelScoreEdit.js" type="text/javascript"></script>
  80. <script type="text/javascript">
  81. var nonSelect = "@DropdownList.SELECT_ALL";
  82. </script>
  83. }
  84. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  85. @using (Ajax.BeginForm(new AjaxOptions
  86. {
  87. OnSuccess = "EMISFunction.FormSuccess",
  88. OnBegin = "EMISFunction.FormSubmit",
  89. OnComplete = "EMISFunction.FormComplete"
  90. }))
  91. {
  92. <div class="p_title">
  93. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  94. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  95. @if (Request["type"] != "detail")
  96. {
  97. @Html.ContextMenuBar("Edit")
  98. }
  99. </div>
  100. </div>
  101. <div class="search_list">
  102. @Html.HiddenFor(x => x.LevelScoreID)
  103. <table cellpadding="0" cellspacing="0" id="levelscoretable">
  104. <tr>
  105. <td style="color: red;">
  106. @Html.LabelFor(x => x.StudentNo):
  107. </td>
  108. <td>
  109. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  110. </td>
  111. <td style="color: red;">
  112. @Html.LabelFor(x => x.ExaminationSubjectName):
  113. </td>
  114. <td>
  115. @Html.ComboGridFor(x => x.ExaminationSubjectID, cgopExaminationSubject)
  116. </td>
  117. </tr>
  118. <tr>
  119. <td>
  120. @Html.LabelFor(x => x.Name):
  121. </td>
  122. <td>
  123. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
  124. </td>
  125. <td>
  126. @Html.LabelFor(x => x.SexName):
  127. </td>
  128. <td>
  129. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  130. </td>
  131. </tr>
  132. <tr>
  133. <td>
  134. @Html.LabelFor(x => x.ClassmajorName):
  135. </td>
  136. <td>
  137. @Html.ComboGridFor(x => x.ClassmajorID, cgopClassmajor)
  138. </td>
  139. <td>
  140. @Html.LabelFor(x => x.InSchoolStatusName):
  141. </td>
  142. <td>
  143. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  144. </td>
  145. </tr>
  146. <tr>
  147. <td>
  148. @Html.LabelFor(x => x.SchoolyearCode):
  149. </td>
  150. <td>
  151. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  152. {
  153. TextField = "Text",
  154. ValueField = "Value",
  155. BindType = DropdownListBindType.PleaseSelect,
  156. IsEnabled = isEnable,
  157. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  158. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  159. })
  160. </td>
  161. <td style="color: red;">
  162. @Html.LabelFor(x => x.ExaminationDate):
  163. </td>
  164. <td>
  165. @Html.TextBoxFor(x => x.ExaminationDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month, IsEnabled = isEnable })
  166. </td>
  167. </tr>
  168. <tr>
  169. <td>
  170. @Html.LabelFor(x => x.ScoreNo):
  171. </td>
  172. <td>
  173. @Html.TextBoxFor(x => x.ScoreNo, new TextBoxOptions() { IsEnabled = isEnable })
  174. </td>
  175. <td style="color: red;">
  176. @Html.LabelFor(x => x.TotalScore):
  177. </td>
  178. <td>
  179. @Html.TextBoxFor(x => x.TotalScore, new TextBoxOptions() { IsEnabled = isEnable })
  180. </td>
  181. </tr>
  182. <tr>
  183. <td>
  184. @Html.LabelFor(x => x.Remark):
  185. </td>
  186. <td colspan="3">
  187. @if (!isEnable)
  188. {
  189. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  190. {
  191. { "style", "width: 90%;min-height: 45px" },
  192. { "disabled", "true" }
  193. })
  194. }
  195. else
  196. {
  197. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  198. }
  199. </td>
  200. </tr>
  201. </table>
  202. </div>
  203. }
  204. </div>