Edit.cshtml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. @model EMIS.ViewModel.StudentManage.StudentProfile.StudentEncourageView
  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/StudentEncourageEdit.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;"></div>
  74. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  75. @if (Request["type"] != "detail")
  76. {
  77. @Html.ContextMenuBar("Edit")
  78. }
  79. </div>
  80. </div>
  81. <div class="search_list">
  82. @Html.HiddenFor(x => x.StudentEncourageID)
  83. <table cellpadding="0" cellspacing="0" id="studentEncouragetable">
  84. <tr>
  85. <td style="color: red;">
  86. @Html.LabelFor(x => x.SchoolyearCode):
  87. </td>
  88. <td>
  89. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  90. {
  91. TextField = "Text",
  92. ValueField = "Value",
  93. BindType = DropdownListBindType.PleaseSelect,
  94. IsEnabled = false,
  95. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  96. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  97. })
  98. </td>
  99. <td style="color: red;">
  100. @Html.LabelFor(x => x.StudentNo):
  101. </td>
  102. <td>
  103. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  104. </td>
  105. </tr>
  106. <tr>
  107. <td>
  108. @Html.LabelFor(x => x.Name):
  109. </td>
  110. <td>
  111. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
  112. </td>
  113. <td>
  114. @Html.LabelFor(x => x.SexName):
  115. </td>
  116. <td>
  117. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  118. </td>
  119. </tr>
  120. <tr>
  121. <td>
  122. @Html.LabelFor(x => x.ClassmajorName):
  123. </td>
  124. <td>
  125. @Html.ComboGridFor(x => x.ClassmajorID, cgopClassmajor)
  126. </td>
  127. <td>
  128. @Html.LabelFor(x => x.InSchoolStatusName):
  129. </td>
  130. <td>
  131. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  132. </td>
  133. </tr>
  134. <tr>
  135. <td style="color: red;">
  136. @Html.LabelFor(x => x.EncourageName):
  137. </td>
  138. <td>
  139. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EncourageName, (x => x.EncourageNameID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  140. </td>
  141. <td>
  142. @Html.LabelFor(x => x.EncourageTypeName):
  143. </td>
  144. <td>
  145. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EncourageType, (x => x.EncourageTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>
  150. @Html.LabelFor(x => x.EncourageLevelName):
  151. </td>
  152. <td>
  153. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EncourageLevel, (x => x.EncourageLevelID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  154. </td>
  155. <td>
  156. @Html.LabelFor(x => x.DocNo):
  157. </td>
  158. <td>
  159. @Html.TextBoxFor(x => x.DocNo, new TextBoxOptions() { IsEnabled = isEnable })
  160. </td>
  161. </tr>
  162. <tr>
  163. <td>
  164. @Html.LabelFor(x => x.Unit):
  165. </td>
  166. <td colspan="3">
  167. @if (!isEnable)
  168. {
  169. @Html.TextBoxFor(x => x.Unit, new Dictionary<string, object>
  170. {
  171. { "style", "width: 90%;min-height: 20px" },
  172. { "disabled", "true" }
  173. })
  174. }
  175. else
  176. {
  177. @Html.TextBoxFor(x => x.Unit, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  178. }
  179. </td>
  180. </tr>
  181. <tr>
  182. <td>
  183. @Html.LabelFor(x => x.EncourageDate):
  184. </td>
  185. <td>
  186. @Html.TextBoxFor(x => x.EncourageDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  187. </td>
  188. <td>
  189. @Html.LabelFor(x => x.Amount):
  190. </td>
  191. <td>
  192. @Html.TextBoxFor(x => x.Amount, new TextBoxOptions() { IsEnabled = isEnable })
  193. </td>
  194. </tr>
  195. <tr>
  196. <td>
  197. @Html.LabelFor(x => x.Reason):
  198. </td>
  199. <td colspan="3">
  200. @if (!isEnable)
  201. {
  202. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object>
  203. {
  204. { "style", "width: 90%;min-height: 45px" },
  205. { "disabled", "true" }
  206. })
  207. }
  208. else
  209. {
  210. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  211. }
  212. </td>
  213. </tr>
  214. </table>
  215. </div>
  216. }
  217. </div>