EditForGD.cshtml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. @model EMIS.ViewModel.Students.StudentsView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isAddNew = (Request["userId"] ?? "") == "";
  7. ComboGridOptions cgopStudentcharge = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "ClassmajorID",
  11. OnSelect = "QueryClassmajorComboGrid",
  12. IsEnabled = isAddNew,
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.12 },
  18. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 },
  19. //new BoundFieldColumn { FieldName="yearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.1 },
  20. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
  21. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.1 },
  22. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.15 }
  23. //new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学年学期", Align=AlignStyle.Center }
  24. },
  25. IsCheckOnSelect = true,
  26. DataSourceUrl = Url.Content("~/Classmajor/List"),
  27. IsPagination = true,
  28. IsShowRowNumbers = true,
  29. IsSingleSelect = false
  30. }
  31. };
  32. }
  33. <style type="text/css">
  34. .universitytable
  35. {
  36. width: 100%;
  37. border: 0px none;
  38. }
  39. .universitytable tr
  40. {
  41. min-height: 30px;
  42. }
  43. .a4
  44. {
  45. width: 600px;
  46. color: Red;
  47. }
  48. </style>
  49. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  50. @using (Html.BeginForm("Edit", "Students", new { Userid = Request["Userid"], MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
  51. {
  52. <div class="p_title">
  53. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  54. </div>
  55. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  56. @if(Request["isView"] != "1")
  57. {
  58. @Html.ContextMenuBar("Edit")
  59. }
  60. </div>
  61. </div>
  62. <div class="search_list">
  63. @Html.HiddenFor(x => x.UserID)
  64. @Html.HiddenFor(x => x.PlanningGraduateDateStr)
  65. @Html.HiddenFor(x=>x.GradeMajorID)
  66. @if(isAddNew==false)
  67. {
  68. @Html.HiddenFor(x=>x.LoginID)
  69. }
  70. <table cellpadding="0" cellspacing="0" class="universitytable">
  71. @*<tr>
  72. <td colspan="4">
  73. <span class="a4">个人信息</span>
  74. </td>
  75. </tr>*@
  76. <tr>
  77. <td>@Html.LabelFor(x => x.LoginID):
  78. </td>
  79. <td>@Html.TextBoxFor(x => x.LoginID, new TextBoxOptions() {IsEnabled = isAddNew })
  80. </td>
  81. <td rowspan="4">@Html.LabelFor(x => x.PhotoUrl):
  82. </td>
  83. <td rowspan="4">
  84. <div>
  85. <img src="@Model.PhotoUrl" width="90" height="100" />
  86. </div>
  87. <div>
  88. @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary<string, object> { { "style", "width:150px;" } })
  89. </div>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td>@Html.LabelFor(x => x.UserName):
  94. </td>
  95. <td>
  96. @*@Html.TextBoxFor(x => x.UserName, new TextBoxOptions() {IsEnabled = isAddNew })*@
  97. @Html.TextBoxFor(x => x.UserName)
  98. </td>
  99. </tr>
  100. <tr>
  101. <td>@Html.LabelFor(x => x.Sex):
  102. </td>
  103. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.Sex))
  104. </td>
  105. </tr>
  106. <tr>
  107. <td>@Html.LabelFor(x => x.StudentType):
  108. </td>
  109. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_STUDENTTYPE, (x => x.StudentType))
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>@Html.LabelFor(x => x.CertificatesType):
  114. </td>
  115. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType))
  116. </td>
  117. <td rowspan="4">@Html.LabelFor(x => x.GraduationPictureUrl):
  118. </td>
  119. <td rowspan="4">
  120. <div>
  121. <img src="@Model.GraduationPictureUrl" width="90" height="100" />
  122. </div>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td>@Html.LabelFor(x => x.IDNumber):
  127. </td>
  128. <td>@Html.TextBoxFor(x => x.IDNumber)
  129. </td>
  130. </tr>
  131. <tr>
  132. <td>@Html.LabelFor(x => x.ClassMajorID):
  133. </td>
  134. <td>
  135. @Html.ComboGridFor(x => x.ClassMajorID, cgopStudentcharge)
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>@Html.LabelFor(x => x.EnteringSchoolYearID):
  140. </td>
  141. <td>@Html.DropdownListFor(x => x.EnteringSchoolYearID, new DropdownListOptions { ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", })
  142. </td>
  143. </tr>
  144. <tr>
  145. <td>@Html.LabelFor(x => x.InSchoolStatusID):
  146. </td>
  147. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), new DropdownListOptions { IsEnabled = isAddNew })
  148. </td>
  149. <td>@Html.LabelFor(x => x.StudentStatus):
  150. </td>
  151. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_STUDENTSTATUS, (x => x.StudentStatus))
  152. </td>
  153. </tr>
  154. <tr>
  155. <td>@Html.LabelFor(x => x.Email):
  156. </td>
  157. <td>@Html.TextBoxFor(x => x.Email)
  158. </td>
  159. <td>@Html.LabelFor(x => x.Mobile):
  160. </td>
  161. <td>@Html.TextBoxFor(x => x.Mobile)
  162. </td>
  163. </tr>
  164. <tr>
  165. <td>@Html.LabelFor(x => x.StudentCardNo):
  166. </td>
  167. <td>@Html.TextBoxFor(x => x.StudentCardNo)
  168. </td>
  169. <td>@Html.LabelFor(x => x.GraduateCardNo):
  170. </td>
  171. <td>@Html.TextBoxFor(x => x.GraduateCardNo)
  172. </td>
  173. </tr>
  174. <tr>
  175. <td>@Html.LabelFor(x => x.PlanningGraduateDate):
  176. </td>
  177. <td>@Html.TextBoxFor(x => x.PlanningGraduateDate, new TextBoxOptions() { TextBoxType = TextBoxType.yyyyMMdd, IsEnabled = false })
  178. </td>
  179. <td>@Html.LabelFor(x => x.IsDreamProject):
  180. </td>
  181. <td>@Html.CheckBoxFor(x=>x.IsDreamProject)
  182. </td>
  183. </tr>
  184. <tr>
  185. <td colspan="4">
  186. <span class="a4">学生扩展信息</span>
  187. </td>
  188. </tr>
  189. <tr>
  190. <td>@Html.LabelFor(x => x.UsedName):
  191. </td>
  192. <td>@Html.TextBoxFor(x => x.UsedName)
  193. </td>
  194. <td>@Html.LabelFor(x => x.DirectorName):
  195. </td>
  196. <td>@Html.TextBoxFor(x => x.DirectorName)
  197. </td>
  198. </tr>
  199. <tr>
  200. <td>@Html.LabelFor(x => x.BirthDate):
  201. </td>
  202. <td>@Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  203. </td>
  204. <td>@Html.LabelFor(x => x.Country):
  205. </td>
  206. <td>@Html.TextBoxFor(x => x.Country)
  207. </td>
  208. </tr>
  209. <tr>
  210. <td>@Html.LabelFor(x => x.Politics):
  211. </td>
  212. <td>@Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Politics, (x => x.Politics), DropdownListBindType.PleaseSelect)
  213. </td>
  214. <td>@Html.LabelFor(x => x.Nation):
  215. </td>
  216. <td>@Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.Nation), DropdownListBindType.PleaseSelect)
  217. </td>
  218. </tr>
  219. <tr>
  220. <td>@Html.LabelFor(x => x.Place):
  221. </td>
  222. <td>@Html.TextBoxFor(x => x.Place)
  223. </td>
  224. <td>@Html.LabelFor(x => x.Healthy):
  225. </td>
  226. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.Healthy))
  227. </td>
  228. </tr>
  229. <tr>
  230. <td>@Html.LabelFor(x => x.BloodGroup):
  231. </td>
  232. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BLOODGROUP, (x => x.BloodGroup))
  233. </td>
  234. <td>@Html.LabelFor(x => x.Specialty):
  235. </td>
  236. <td>@Html.TextBoxFor(x => x.Specialty)
  237. </td>
  238. </tr>
  239. <tr>
  240. <td>@Html.LabelFor(x => x.Height):
  241. </td>
  242. <td>@Html.TextBoxFor(x => x.Height)
  243. </td>
  244. <td>@Html.LabelFor(x => x.Weight):
  245. </td>
  246. <td>@Html.TextBoxFor(x => x.Weight)
  247. </td>
  248. </tr>
  249. <tr>
  250. <td colspan="4">
  251. <span class="a4">高考招生信息</span>
  252. </td>
  253. </tr>
  254. <tr>
  255. <td>@Html.LabelFor(x => x.ExamineeNum):
  256. </td>
  257. <td>@Html.TextBoxFor(x => x.ExamineeNum, new TextBoxOptions() {IsEnabled = isAddNew })
  258. </td>
  259. <td>@Html.LabelFor(x => x.EntranceDate):
  260. </td>
  261. <td>@Html.TextBoxFor(x => x.EntranceDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  262. </td>
  263. </tr>
  264. <tr>
  265. <td>@Html.LabelFor(x => x.CultureModel):
  266. </td>
  267. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CULTUREMODEL, (x => x.CultureModel))
  268. </td>
  269. <td>@Html.LabelFor(x => x.ExamineeType):
  270. </td>
  271. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EXAMINEETYPE, (x => x.ExamineeType))
  272. </td>
  273. </tr>
  274. <tr>
  275. <td>@Html.LabelFor(x => x.EntranceWay):
  276. </td>
  277. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EntranceWay, (x => x.EntranceWay))
  278. </td>
  279. <td>@Html.LabelFor(x => x.Features):
  280. </td>
  281. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Features, (x => x.Features))
  282. </td>
  283. </tr>
  284. <tr>
  285. <td>@Html.LabelFor(x => x.Territorial):
  286. </td>
  287. <td>@Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Province, (x => x.Territorial), DropdownListBindType.PleaseSelect)
  288. </td>
  289. <td>@Html.LabelFor(x => x.Placebirth):
  290. </td>
  291. <td>@Html.TextBoxFor(x => x.Placebirth)
  292. </td>
  293. </tr>
  294. <tr>
  295. <td>@Html.LabelFor(x => x.Area):
  296. </td>
  297. <td>@Html.TextBoxFor(x => x.Area)
  298. </td>
  299. <td>@Html.LabelFor(x => x.Score):
  300. </td>
  301. <td>@Html.TextBoxFor(x => x.Score)
  302. </td>
  303. </tr>
  304. <tr>
  305. <td colspan="4">
  306. <span class="a4">学生缴费信息</span>
  307. </td>
  308. </tr>
  309. <tr>
  310. <td>@Html.LabelFor(x => x.CardNo):
  311. </td>
  312. <td>@Html.TextBoxFor(x => x.CardNo)
  313. </td>
  314. <td>@Html.LabelFor(x => x.BankName):
  315. </td>
  316. <td>@Html.TextBoxFor(x => x.BankName)
  317. </td>
  318. </tr>
  319. <tr>
  320. <td colspan="4">
  321. <span class="a4">学生联系信息</span>
  322. </td>
  323. </tr>
  324. <tr>
  325. <td>@Html.LabelFor(x => x.Telephone):
  326. </td>
  327. <td>@Html.TextBoxFor(x => x.Telephone)
  328. </td>
  329. <td>@Html.LabelFor(x => x.QQ):
  330. </td>
  331. <td>@Html.TextBoxFor(x => x.QQ)
  332. </td>
  333. </tr>
  334. <tr>
  335. <td>@Html.LabelFor(x => x.MicroMsgNo):
  336. </td>
  337. <td>@Html.TextBoxFor(x => x.MicroMsgNo)
  338. </td>
  339. <td>@Html.LabelFor(x => x.ZipCode):
  340. </td>
  341. <td>@Html.TextBoxFor(x => x.ZipCode)
  342. </td>
  343. </tr>
  344. <tr>
  345. <td>@Html.LabelFor(x => x.Address):
  346. </td>
  347. <td>@Html.TextBoxFor(x => x.Address)
  348. </td>
  349. <td>@Html.LabelFor(x => x.WorkUnit):
  350. </td>
  351. <td>@Html.TextBoxFor(x => x.WorkUnit)
  352. </td>
  353. </tr>
  354. <tr>
  355. <td>@Html.LabelFor(x => x.HomeAddress):
  356. </td>
  357. <td>@Html.TextBoxFor(x => x.HomeAddress)
  358. </td>
  359. <td>@Html.LabelFor(x => x.Recipient):
  360. </td>
  361. <td>@Html.TextBoxFor(x => x.Recipient)
  362. </td>
  363. </tr>
  364. <tr>
  365. <td>@Html.LabelFor(x => x.Dormitory):
  366. </td>
  367. <td>@Html.TextBoxFor(x => x.Dormitory)
  368. </td>
  369. <td>
  370. </td>
  371. <td>
  372. </td>
  373. </tr>
  374. @if (Request["isView"] == "1")
  375. {
  376. <tr>
  377. <td colspan="4">
  378. <span class="a4">学生异动信息</span>
  379. </td>
  380. </tr>
  381. <tr>
  382. <td colspan="4">
  383. <div style="width: 100%; height: 100px; overflow: scroll; scrollbar-arrow-color:#ffffff; scrollbar-highlight-color:#ffffff; scrollbar-3dlight-color:#70807d; scrollbar-shadow-color:#ffffff; scrollbar-darkshadow-color:#70807d; scrollbar-track-color:#ffffff">
  384. @Html.DataGrid(new DataGridOptions
  385. {
  386. Columns = new List<DataGridColumn>()
  387. {
  388. new CheckBoxFieldColumn{ HeaderText="", FieldName="EntityID"},
  389. new LinkButtonColumn { FieldName="SchoolyearCode", HeaderText="异动学期", Align=AlignStyle.Center, Handle="edit",Width=0.05 },
  390. //new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center,Width=0.045 },
  391. //new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,OverflowLength=6,Width=0.02 },
  392. new BoundFieldColumn { FieldName="DifferentDynamicTypeName", HeaderText="异动类型", Align=AlignStyle.Center,Width=0.025 },
  393. new BoundFieldColumn { FieldName="Reason", HeaderText="异动原因", Align=AlignStyle.Center, OverflowLength=6,Width=0.025, IsHidden=true },
  394. //new BoundFieldColumn { FieldName="ReasonName", HeaderText="异动原因", Align=AlignStyle.Center, OverflowLength=6,Width=0.025 },
  395. //new BoundFieldColumn { FieldName="StandardName", HeaderText="异动前专业", Align=AlignStyle.Center },
  396. //new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="异动前班级", Align=AlignStyle.Center,OverflowLength=13 },
  397. //new BoundFieldColumn { FieldName="AfterStandardName", HeaderText="异动后专业", Align=AlignStyle.Center },
  398. new BoundFieldColumn { FieldName="AfterClassmajorName", HeaderText="异动后班级", Align=AlignStyle.Center,OverflowLength=13 },
  399. new BoundFieldColumn { FieldName="EntityCreateTime", HeaderText="异动日期",Align=AlignStyle.Center,Formatter= Formatter.OnlyYearMonthDay,Width=0.04 },
  400. //new BoundFieldColumn { FieldName="ReportStatusName", HeaderText="注册状态", Align=AlignStyle.Center,Width=0.03 },
  401. },
  402. PageSize=3,
  403. IsCheckOnSelect = true,
  404. DataSourceUrl = Url.Content("~/DifferentDynamicResult/StudentDifferentDynamicApplyInfo?userID=" + Model.UserID),
  405. ID = "dgList",
  406. IsPagination = true,
  407. IsShowRowNumbers = true,
  408. IsSingleSelect = false
  409. })
  410. </div>
  411. </td>
  412. </tr>
  413. }
  414. <tr>
  415. <td>@Html.LabelFor(x => x.Career):
  416. </td>
  417. <td colspan="3">@Html.TextAreaFor(x => x.Career, new Dictionary<string, object> { { "style", "width:85%" } })
  418. </td>
  419. </tr>
  420. <tr>
  421. <td>@Html.LabelFor(x => x.Remarks):
  422. </td>
  423. <td colspan="3">@Html.TextAreaFor(x => x.Remarks, new Dictionary<string, object> { { "style", "width:85%" } })
  424. </td>
  425. </tr>
  426. </table>
  427. </div>
  428. }
  429. </div>
  430. @section scripts{
  431. <script type="text/javascript">
  432. var mnu = "";
  433. //加载
  434. $(function () {
  435. mnu = $.SystemGeneral.getUrlParam("MNU");
  436. });
  437. function Student_Sava() {
  438. var userID = $("#UserID").val();
  439. var code = $("#LoginID").val();
  440. $.post('/Students/Verification', { userID: userID, code: code }, function (data) {
  441. if (data == "成功") {
  442. $(document.forms[0]).submit();
  443. } else {
  444. $.messager.alert("系统提示", data);
  445. }
  446. });
  447. }
  448. function QueryClassmajorComboGrid(data) {
  449. var schoolyearID = $(this)[0].SchoolyearID; //班级的毕业学年学期
  450. // var learnSystem = $(this)[0].LearnSystem;
  451. // var yearID = parseInt(schoolyearID) + parseInt(learnSystem);
  452. // var schoolcodeID = $(this)[0].SchoolcodeID;
  453. $.post('/Students/GetPlanningGraduateDate', { GradeMajorID: data.GrademajorID }, function (data) {
  454. if (data != "") {
  455. $("#PlanningGraduateDate").val(data);
  456. $("#PlanningGraduateDateStr").val(data);
  457. }
  458. });
  459. }
  460. //点击列表更新
  461. function edit(rowindex, rowdata) {
  462. showDialog(rowdata.EntityID);
  463. }
  464. function showDialog(id) {
  465. var redirectTo = "/DifferentDynamicResult/Edit?a=1";
  466. if (id) {
  467. redirectTo = redirectTo + '&id=' + id;
  468. }
  469. redirectTo = redirectTo + '&MNU=' + mnu;
  470. // top.$('#sysWindow').dialog({
  471. // title: '异动申请信息',
  472. // width: 800,
  473. // height: 500,
  474. // content: '<iframe id="iframe1" frameborder="0" scrolling="no" width="770" height="420" src="' + redirectTo + '"></iframe>',
  475. // modal: true
  476. // });
  477. $.popupTopWindow('异动详情', redirectTo, 800, 600, null, null);
  478. }
  479. </script>
  480. }