Edit.cshtml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. @model EMIS.ViewModel.StudentManage.StudentProfile.StudentPunishView
  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. @section scripts{
  59. <script src="~/Scripts/Business/StudentManage/StudentProfile/StudentPunishEdit.js" type="text/javascript"></script>
  60. <script type="text/javascript">
  61. var nonSelect = "@DropdownList.SELECT_ALL";
  62. </script>
  63. }
  64. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  65. @using (Ajax.BeginForm(new AjaxOptions
  66. {
  67. OnSuccess = "EMISFunction.FormSuccess",
  68. OnBegin = "EMISFunction.FormSubmit",
  69. OnComplete = "EMISFunction.FormComplete"
  70. }))
  71. {
  72. <div class="p_title">
  73. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  74. </div>
  75. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  76. @if (Request["type"] != "detail")
  77. {
  78. @Html.ContextMenuBar("Edit")
  79. }
  80. </div>
  81. </div>
  82. <div class="search_list">
  83. @Html.HiddenFor(x => x.StudentPunishID)
  84. <table cellpadding="0" cellspacing="0" id="changeapplytable">
  85. <tr>
  86. <td style="color: red;">
  87. @Html.LabelFor(x => x.SchoolyearCode):
  88. </td>
  89. <td>
  90. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  91. {
  92. TextField = "Text",
  93. ValueField = "Value",
  94. BindType = DropdownListBindType.PleaseSelect,
  95. IsEnabled = false,
  96. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  97. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  98. })
  99. </td>
  100. <td style="color: red;">
  101. @Html.LabelFor(x => x.StudentNo):
  102. </td>
  103. <td>
  104. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  105. </td>
  106. </tr>
  107. <tr>
  108. <td>
  109. @Html.LabelFor(x => x.Name):
  110. </td>
  111. <td>
  112. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
  113. </td>
  114. <td>
  115. @Html.LabelFor(x => x.SexName):
  116. </td>
  117. <td>
  118. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>
  123. @Html.LabelFor(x => x.ClassmajorName):
  124. </td>
  125. <td>
  126. @Html.ComboGridFor(x => x.ClassmajorID, cgopClassmajor)
  127. </td>
  128. <td>
  129. @Html.LabelFor(x => x.InSchoolStatusName):
  130. </td>
  131. <td>
  132. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  133. </td>
  134. </tr>
  135. <tr>
  136. <td style="color: red;">
  137. @Html.LabelFor(x => x.PunishTypeID):
  138. </td>
  139. <td>
  140. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_PunishType, (x => x.PunishTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  141. </td>
  142. <td>
  143. @Html.LabelFor(x => x.PunishLevelName):
  144. </td>
  145. <td>
  146. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_PunishLevel, (x => x.PunishLevelID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  147. </td>
  148. </tr>
  149. <tr>
  150. <td>
  151. @Html.LabelFor(x => x.DocNo):
  152. </td>
  153. <td>
  154. @Html.TextBoxFor(x => x.DocNo, new TextBoxOptions() { IsEnabled = isEnable })
  155. </td>
  156. <td>
  157. @Html.LabelFor(x => x.PunishDate):
  158. </td>
  159. <td>
  160. @Html.TextBoxFor(x => x.PunishDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  161. </td>
  162. </tr>
  163. <tr>
  164. <td>
  165. @Html.LabelFor(x => x.Reason):
  166. </td>
  167. <td colspan="3">
  168. @if (!isEnable)
  169. {
  170. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object>
  171. {
  172. { "style", "width: 90%;min-height: 45px" },
  173. { "disabled", "true" }
  174. })
  175. }
  176. else
  177. {
  178. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  179. }
  180. </td>
  181. </tr>
  182. </table>
  183. </div>
  184. }
  185. </div>