Cancel.cshtml 9.6 KB

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