Edit.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. @model EMIS.ViewModel.EnrollManage.NewStudentManage.NewStudentView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. //专业信息
  8. ComboGridOptions cgopSpecialty = new ComboGridOptions
  9. {
  10. TextField = "StandardName",
  11. ValueField = "SpecialtyID",
  12. OnSelect = "querySpecialty",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, OrderFieldName="StandardCode", Width=0.1 },
  19. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, OrderFieldName="StandardName", Width=0.2 },
  20. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, OrderFieldName="EducationID", Width=0.12 },
  21. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, OrderFieldName="LearningformID", Width=0.12 },
  22. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
  23. new BoundFieldColumn { FieldName="RecordStatusStr", HeaderText="状态", Align=AlignStyle.Center, OrderFieldName="RecordStatus", Width=0.12 }
  24. },
  25. PageSize = 5,
  26. IsCheckOnSelect = true,
  27. DataSourceUrl = Url.Content("~/Specialty/GetEnableAndUseSpecialtyView" + "?specialtyID=" + Model.SpecialtyID),
  28. IsPagination = true,
  29. IsShowRowNumbers = true,
  30. IsSingleSelect = false,
  31. }
  32. };
  33. }
  34. @section scripts{
  35. <script src="~/Scripts/Business/EnrollManage/NewStudentManage/NewStudentEdit.js" type="text/javascript"></script>
  36. <script type="text/javascript">
  37. var nonSelect = "@DropdownList.SELECT_ALL";
  38. </script>
  39. }
  40. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  41. @using (Html.BeginForm("Edit", "NewStudent", new
  42. {
  43. MNU = Request["MNU"],
  44. WindowID = Request["WindowID"] },
  45. FormMethod.Post,
  46. new { enctype = "multipart/form-data"
  47. }))
  48. {
  49. <div class="p_title">
  50. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  51. </div>
  52. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  53. @if (Request["type"] != "detail")
  54. {
  55. @Html.ContextMenuBar("Edit")
  56. }
  57. </div>
  58. </div>
  59. <div class="search_list">
  60. @Html.HiddenFor(x => x.NewStudentID)
  61. <table cellpadding="0" cellspacing="0" id="newStudentTable">
  62. <tr>
  63. <td style="color:red;">
  64. @Html.LabelFor(x => x.ExamineeNum):
  65. </td>
  66. <td>
  67. @Html.TextBoxFor(x => x.ExamineeNum, new TextBoxOptions() { IsEnabled = isEnable })
  68. </td>
  69. <td rowspan="5">
  70. @Html.LabelFor(x => x.RecruitPictureUrl):
  71. </td>
  72. <td rowspan="5">
  73. <div>
  74. <img src="@Model.RecruitPictureUrlStr" id="imgPhoto" width="118" height="125" />
  75. </div>
  76. <div>
  77. <span>
  78. @if (isEnable)
  79. {
  80. if (Request["type"] == "edit")
  81. {
  82. @Html.SingleUploaderFor(x => x.RecruitPictureUrl, new Dictionary<string, object> { { "style", "width:125px;" } })
  83. <input type="button" value="删除" onclick="javascript: delPhoto();" />
  84. }
  85. else
  86. {
  87. @Html.SingleUploaderFor(x => x.RecruitPictureUrl, new Dictionary<string, object> { { "style", "width:175px;" } })
  88. }
  89. }
  90. </span>
  91. </div>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td>
  96. @Html.LabelFor(x => x.AdmissionTicketNo):
  97. </td>
  98. <td>
  99. @Html.TextBoxFor(x => x.AdmissionTicketNo, new TextBoxOptions() { IsEnabled = isEnable })
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>
  104. @Html.LabelFor(x => x.Name):
  105. </td>
  106. <td>
  107. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  108. </td>
  109. </tr>
  110. <tr>
  111. <td>
  112. @Html.LabelFor(x => x.SexID):
  113. </td>
  114. <td>
  115. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  116. </td>
  117. </tr>
  118. <tr>
  119. <td>
  120. @Html.LabelFor(x => x.NationID):
  121. </td>
  122. <td>
  123. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.NationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  124. </td>
  125. </tr>
  126. <tr>
  127. <td>
  128. @Html.LabelFor(x => x.PoliticsID):
  129. </td>
  130. <td>
  131. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Politics, (x => x.PoliticsID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  132. </td>
  133. <td>
  134. @Html.LabelFor(x => x.BirthDate):
  135. </td>
  136. <td>
  137. @Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  138. </td>
  139. </tr>
  140. <tr>
  141. <td>
  142. @Html.LabelFor(x => x.CertificatesType):
  143. </td>
  144. <td>
  145. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  146. </td>
  147. <td>
  148. @Html.LabelFor(x => x.IDNumber):
  149. </td>
  150. <td>
  151. @Html.TextBoxFor(x => x.IDNumber, new TextBoxOptions() { IsEnabled = isEnable })
  152. </td>
  153. </tr>
  154. <tr>
  155. <td colspan="4" style="padding:1px;height:10px;">
  156. <div id="specialtyExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  157. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  158. onclick="swapSpecialty();">
  159. </div>
  160. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapSpecialty();">
  161. 招生信息
  162. </div>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td style="color:red;">
  167. @Html.LabelFor(x => x.GradeID):
  168. </td>
  169. <td>
  170. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.GradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  171. </td>
  172. <td style="color:red;">
  173. @Html.LabelFor(x => x.StandardName):
  174. </td>
  175. <td>
  176. @Html.ComboGridFor(x => x.SpecialtyID, cgopSpecialty)
  177. </td>
  178. </tr>
  179. <tr>
  180. <td style="color:red;">
  181. @Html.LabelFor(x => x.Code):
  182. </td>
  183. <td>
  184. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = false })
  185. </td>
  186. <td style="color:red;">
  187. @Html.LabelFor(x => x.EducationID):
  188. </td>
  189. <td>
  190. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  191. </td>
  192. </tr>
  193. <tr>
  194. <td style="color:red;">
  195. @Html.LabelFor(x => x.LearningformID):
  196. </td>
  197. <td>
  198. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  199. </td>
  200. <td style="color:red;">
  201. @Html.LabelFor(x => x.LearnSystem):
  202. </td>
  203. <td>
  204. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false })
  205. </td>
  206. </tr>
  207. <tr>
  208. <td style="color:red;">
  209. @Html.LabelFor(x => x.SemesterID):
  210. </td>
  211. <td>
  212. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Semester, (x => x.SemesterID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  213. </td>
  214. <td style="color:red;">
  215. @Html.LabelFor(x => x.AssignStatus):
  216. </td>
  217. <td>
  218. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_AssignStatus, (x => x.AssignStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  219. </td>
  220. </tr>
  221. <tr>
  222. <td colspan="4" style="padding:1px;height:10px;">
  223. <div id="otherExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  224. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  225. onclick="swapOther();">
  226. </div>
  227. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapOther();">
  228. 其它信息
  229. </div>
  230. </td>
  231. </tr>
  232. <tr>
  233. <td>
  234. @Html.LabelFor(x => x.EntranceDate):
  235. </td>
  236. <td>
  237. @Html.TextBoxFor(x => x.EntranceDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  238. </td>
  239. <td>
  240. @Html.LabelFor(x => x.Score):
  241. </td>
  242. <td>
  243. @Html.TextBoxFor(x => x.Score, new TextBoxOptions() { IsEnabled = isEnable })
  244. </td>
  245. </tr>
  246. <tr>
  247. <td>
  248. @Html.LabelFor(x => x.Telephone):
  249. </td>
  250. <td>
  251. @Html.TextBoxFor(x => x.Telephone, new TextBoxOptions() { IsEnabled = isEnable })
  252. </td>
  253. <td>
  254. @Html.LabelFor(x => x.ZIPCode):
  255. </td>
  256. <td>
  257. @Html.TextBoxFor(x => x.ZIPCode, new TextBoxOptions() { IsEnabled = isEnable })
  258. </td>
  259. </tr>
  260. <tr>
  261. <td>
  262. @Html.LabelFor(x => x.EntranceWayID):
  263. </td>
  264. <td>
  265. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_EntranceWay, (x => x.EntranceWayID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  266. </td>
  267. <td>
  268. @Html.LabelFor(x => x.FeaturesID):
  269. </td>
  270. <td>
  271. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Features, (x => x.FeaturesID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  272. </td>
  273. </tr>
  274. <tr>
  275. <td>
  276. @Html.LabelFor(x => x.TerritorialID):
  277. </td>
  278. <td>
  279. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Province, (x => x.TerritorialID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  280. </td>
  281. <td>
  282. @Html.LabelFor(x => x.Dormitory):
  283. </td>
  284. <td>
  285. @Html.TextBoxFor(x => x.Dormitory, new TextBoxOptions() { IsEnabled = isEnable })
  286. </td>
  287. </tr>
  288. <tr>
  289. <td>
  290. @Html.LabelFor(x => x.Address):
  291. </td>
  292. <td colspan="3">
  293. @Html.TextBoxFor(x => x.Address, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:90%;" } })
  294. </td>
  295. </tr>
  296. <tr>
  297. <td>
  298. @Html.LabelFor(x => x.Remark):
  299. </td>
  300. <td colspan="3">
  301. @if (!isEnable)
  302. {
  303. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  304. {
  305. { "style", "width: 90%;min-height: 20px" },
  306. { "disabled", "true" }
  307. })
  308. }
  309. else
  310. {
  311. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  312. }
  313. </td>
  314. </tr>
  315. </table>
  316. </div>
  317. }
  318. </div>