ByReplaceEdit.cshtml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. @model EMIS.ViewModel.ScoreManage.ScoreConvertByReplaceView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @using EMIS.ViewModel;
  5. @{
  6. ViewBag.Title = "Edit";
  7. ComboGridOptions optCollege = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "CollegeID",
  11. OnSelect = "queryStandard",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  17. },
  18. IsAutoLoad = false,
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/College/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false,
  24. }
  25. };
  26. ComboGridOptions optStandard = new ComboGridOptions
  27. {
  28. TextField = "StandardName",
  29. ValueField = "StandardID",
  30. OnSelect = "queryClass",
  31. GridOptions = new DataGridOptions
  32. {
  33. Columns = new List<DataGridColumn>()
  34. {
  35. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center }
  36. },
  37. IsAutoLoad = false,
  38. OnLoadSuccessFun = "queryClass",
  39. IsCheckOnSelect = true,
  40. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  41. IsPagination = true,
  42. IsShowRowNumbers = true,
  43. IsSingleSelect = false,
  44. }
  45. };
  46. ComboGridOptions optClassmajor = new ComboGridOptions
  47. {
  48. TextField = "Name",
  49. ValueField = "ClassmajorID",
  50. OnSelect = "queryUser",
  51. GridOptions = new DataGridOptions
  52. {
  53. Columns = new List<DataGridColumn>()
  54. {
  55. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center }
  56. },
  57. IsAutoLoad = false,
  58. OnLoadSuccessFun = "queryUser",
  59. IsCheckOnSelect = true,
  60. DataSourceUrl = Url.Content("~/Classmajor/List"),
  61. IsPagination = true,
  62. IsShowRowNumbers = true,
  63. IsSingleSelect = false
  64. }
  65. };
  66. ComboGridOptions optUser = new ComboGridOptions
  67. {
  68. TextField = "LoginID",
  69. ValueField = "UserID",
  70. IsAutoComplete = true,
  71. MinReloadCharactor = EMIS.Utility.Const.LOCAL_SETTING_LoginIDLength,
  72. OnSelect = "queryCourse",
  73. GridOptions = new DataGridOptions
  74. {
  75. Columns = new List<DataGridColumn>()
  76. {
  77. new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Width=0.1, Align=AlignStyle.Center },
  78. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Width=0.1, Align=AlignStyle.Center },
  79. },
  80. IsAutoLoad = false,
  81. OnLoadSuccessFun = "queryCourse",
  82. IsCheckOnSelect = true,
  83. DataSourceUrl = Url.Content("~/Students/List"),
  84. IsPagination = true,
  85. IsShowRowNumbers = true,
  86. IsSingleSelect = false
  87. }
  88. };
  89. ComboGridOptions optSourceCoursematerial = new ComboGridOptions
  90. {
  91. TextField = "CourseName",
  92. ValueField = "CoursematerialID",
  93. OnSelect = "querySourceScore",
  94. GridOptions = new DataGridOptions
  95. {
  96. Columns = new List<DataGridColumn>()
  97. {
  98. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.1, Align=AlignStyle.Center },
  99. },
  100. OnLoadSuccessFun = "querySourceScore",
  101. IsAutoLoad = false,
  102. IsCheckOnSelect = true,
  103. DataSourceUrl = Url.Content("~/ScoreConvert/SourceCoursematerialList"),
  104. IsPagination = true,
  105. IsShowRowNumbers = true,
  106. IsSingleSelect = false
  107. }
  108. };
  109. ComboGridOptions optTargetCoursematerial = new ComboGridOptions
  110. {
  111. TextField = "CourseName",
  112. ValueField = "CoursematerialID",
  113. OnSelect = "queryTargetScore",
  114. GridOptions = new DataGridOptions
  115. {
  116. Columns = new List<DataGridColumn>()
  117. {
  118. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.1, Align=AlignStyle.Center },
  119. },
  120. OnLoadSuccessFun = "queryTargetScore",
  121. IsAutoLoad = false,
  122. IsCheckOnSelect = true,
  123. DataSourceUrl = Url.Content("~/ScoreConvert/TargetCoursematerialList"),
  124. IsPagination = true,
  125. IsShowRowNumbers = true,
  126. IsSingleSelect = false
  127. }
  128. };
  129. }
  130. @section scripts{
  131. <script src="~/Scripts/Business/ScoreManage/ScoreConvertByReplaceEdit.js" type="text/javascript"></script>
  132. <script type="text/javascript">
  133. var nonSelect = "@DropdownList.SELECT_ALL";
  134. </script>
  135. }
  136. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  137. {
  138. <div class="p_title">
  139. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  140. </div>
  141. <div class="search_list">
  142. @Html.HiddenFor(x => x.ScoreConvertByReplaceID)
  143. <table cellpadding="0" cellspacing="0" id="departmenttable">
  144. <tr>
  145. <td>
  146. @Html.LabelFor(x => x.CollegeID):
  147. </td>
  148. <td>
  149. @Html.ComboGridFor(x => x.CollegeID, optCollege)
  150. </td>
  151. <td>
  152. @Html.LabelFor(x => x.YearID):
  153. </td>
  154. <td>
  155. @Html.DictionaryDropDownListFor(DictionaryItem.CF_Year, (x => x.YearID))
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>
  160. @Html.LabelFor(x => x.StandardID):
  161. </td>
  162. <td>
  163. @Html.ComboGridFor(x => x.StandardID, optStandard)
  164. </td>
  165. <td>
  166. @Html.LabelFor(x => x.ClassmajorID):
  167. </td>
  168. <td>
  169. @Html.ComboGridFor(x => x.ClassmajorID, optClassmajor)
  170. </td>
  171. </tr>
  172. <tr>
  173. <td>
  174. @Html.LabelFor(x => x.UserID):
  175. </td>
  176. <td>
  177. @Html.ComboGridFor(x => x.UserID, optUser)
  178. </td>
  179. <td>
  180. @Html.LabelFor(x => x.SourceCoursematerialID):
  181. </td>
  182. <td>
  183. @Html.ComboGridFor(x => x.SourceCoursematerialID, optSourceCoursematerial)
  184. </td>
  185. </tr>
  186. <tr>
  187. <td>
  188. @Html.Label("学时数"):
  189. </td>
  190. <td>
  191. @Html.TextBox(new TextBoxOptions { ID = "SourceTotalHours", IsEnabled = false })
  192. </td>
  193. <td>
  194. @Html.LabelFor(x => x.TotalScore):
  195. </td>
  196. <td>
  197. @Html.TextBox(new TextBoxOptions { IsEnabled = false, ID = "txtTotalScore", Value = Model.TotalScore })
  198. @Html.HiddenFor(x => x.TotalScore)
  199. </td>
  200. </tr>
  201. <tr>
  202. <td>
  203. @Html.LabelFor(x => x.TargetCoursematerialID):
  204. </td>
  205. <td>
  206. @Html.ComboGridFor(x => x.TargetCoursematerialID, optTargetCoursematerial)
  207. </td>
  208. <td>
  209. @Html.Label("学时数"):
  210. </td>
  211. <td>
  212. @Html.TextBox(new TextBoxOptions { ID = "TargetTotalHours", IsEnabled = false })
  213. </td>
  214. </tr>
  215. <tr>
  216. <td>
  217. @Html.LabelFor(x => x.Reason):
  218. </td>
  219. <td colspan="3">
  220. @Html.TextAreaFor(x => x.Reason, new { style = "width: 98%;" })
  221. </td>
  222. </tr>
  223. </table>
  224. </div>
  225. }