Change.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. @using EMIS.Web.Controls;
  2. @model EMIS.ViewModel.Students.StudentsView
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. List<EMIS.ViewModel.Students.StudentChangeFeildView> ChangeFeilds = ViewBag.ChangeFeilds;
  7. List<string> TypeNames = ViewBag.TypeNames;
  8. ComboGridOptions cgopStudentcharge = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "ClassmajorID",
  12. //OnSelect = "QueryClassmajorComboGrid",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center },
  19. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center },
  20. new BoundFieldColumn { FieldName="yearID", HeaderText="学年", Align=AlignStyle.Center },
  21. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center },
  22. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center },
  23. new BoundFieldColumn { FieldName="SchoolyearCode", 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. var controls = new Dictionary<string, KeyValuePair<MvcHtmlString, MvcHtmlString>>();
  33. controls.Add("LoginID", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.LoginID), Html.DisplayFor(x => x.LoginID)));
  34. controls.Add("UserName", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.UserName), Html.TextBoxFor(x => x.UserName)));
  35. //"<div><img src=" + Model.PhotoUrl + " width=120 height=160 /></div><div>" + Html.SingleUploaderFor(x => x.PhotoUrl).ToHtmlString() + "</div>"
  36. controls.Add("PhotoUrl", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.PhotoUrl), MvcHtmlString.Create("<div id=\"prvid\"><img src=" + Model.PhotoUrl + " width=120 height=160 /></div><div><input id=\"files\" name=\"PhotoUrl\" type=\"file\" onchange=\"previewImage(this, 'prvid')\" multiple=\"multiple\"/>")));
  37. controls.Add("Sex", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Sex), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.Sex))));
  38. controls.Add("CertificatesType", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.CertificatesType), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType))));
  39. controls.Add("IDNumber", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.IDNumber), @Html.TextBoxFor(x => x.IDNumber)));
  40. controls.Add("StudentCardNo", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.StudentCardNo), Html.TextBoxFor(x => x.StudentCardNo)));
  41. controls.Add("ClassMajorID", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.ClassMajorID), Html.ComboGridFor(x => x.ClassMajorID, cgopStudentcharge)));
  42. controls.Add("CultureModel", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.CultureModel), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CULTUREMODEL, (x => x.CultureModel))));
  43. controls.Add("StudentType", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.StudentType), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_STUDENTTYPE, (x => x.StudentType))));
  44. controls.Add("StudentStatus", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.StudentStatus), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_STUDENTSTATUS, (x => x.StudentStatus))));
  45. controls.Add("InSchoolStatusID", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.InSchoolStatusID), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID))));
  46. controls.Add("PlanningGraduateDate", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.PlanningGraduateDate), Html.TextBoxFor(x => x.PlanningGraduateDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })));
  47. controls.Add("ExamineeNum", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.ExamineeNum), Html.TextBoxFor(x => x.ExamineeNum)));
  48. controls.Add("ExamineeType", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.ExamineeType), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EXAMINEETYPE, (x => x.ExamineeType))));
  49. controls.Add("EntranceDate", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.EntranceDate), Html.TextBoxFor(x => x.EntranceDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })));
  50. controls.Add("EntranceWay", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.EntranceWay), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EntranceWay, (x => x.EntranceWay))));
  51. controls.Add("EnteringSchoolYearID", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.EnteringSchoolYearID), Html.DropdownListFor(x => x.EnteringSchoolYearID, new DropdownListOptions { ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", })));
  52. controls.Add("Placebirth", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Placebirth), Html.TextBoxFor(x => x.Placebirth)));
  53. controls.Add("Features", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Features), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Features, (x => x.Features))));
  54. controls.Add("Score", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Score), Html.TextBoxFor(x => x.Score)));
  55. controls.Add("Territorial", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Territorial), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Province, (x => x.Territorial))));
  56. controls.Add("Area", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Area), Html.TextBoxFor(x => x.Area)));
  57. controls.Add("UsedName", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.UsedName), Html.TextBoxFor(x => x.UsedName)));
  58. controls.Add("DirectorName", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.DirectorName), Html.TextBoxFor(x => x.DirectorName)));
  59. controls.Add("BirthDate", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.BirthDate), Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })));
  60. controls.Add("Country", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Country), Html.TextBoxFor(x => x.Country)));
  61. controls.Add("Politics", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Politics), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Politics, (x => x.Politics))));
  62. controls.Add("Nation", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Nation), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.Nation))));
  63. controls.Add("Place", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Place), Html.TextBoxFor(x => x.Place)));
  64. controls.Add("Healthy", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Healthy), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.Healthy))));
  65. controls.Add("BloodGroup", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.BloodGroup), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BLOODGROUP, (x => x.BloodGroup))));
  66. controls.Add("Specialty", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Specialty), Html.TextBoxFor(x => x.Specialty)));
  67. controls.Add("Height", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Height), Html.TextBoxFor(x => x.Height)));
  68. controls.Add("Weight", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Weight), Html.TextBoxFor(x => x.Weight)));
  69. controls.Add("Remarks", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Remarks), Html.TextBoxFor(x => x.Remarks)));
  70. controls.Add("CardNo", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.CardNo), Html.TextBoxFor(x => x.CardNo)));
  71. controls.Add("BankName", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.BankName), Html.TextBoxFor(x => x.BankName)));
  72. controls.Add("Email", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Email), Html.TextBoxFor(x => x.Email)));
  73. controls.Add("QQ", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.QQ), Html.TextBoxFor(x => x.QQ)));
  74. controls.Add("Mobile", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Mobile), Html.TextBoxFor(x => x.Mobile)));
  75. controls.Add("Telephone", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Telephone), Html.TextBoxFor(x => x.Telephone)));
  76. controls.Add("MicroMsgNo", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.MicroMsgNo), Html.TextBoxFor(x => x.MicroMsgNo)));
  77. controls.Add("ZipCode", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.ZipCode), Html.TextBoxFor(x => x.ZipCode)));
  78. controls.Add("Address", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Address), Html.TextBoxFor(x => x.Address)));
  79. controls.Add("WorkUnit", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.WorkUnit), Html.TextBoxFor(x => x.WorkUnit)));
  80. controls.Add("HomeAddress", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.HomeAddress), Html.TextBoxFor(x => x.HomeAddress)));
  81. controls.Add("Recipient", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Recipient), Html.TextBoxFor(x => x.Recipient)));
  82. controls.Add("Dormitory", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Dormitory), Html.TextBoxFor(x => x.Dormitory)));
  83. controls.Add("Career", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.Career), Html.TextBoxFor(x => x.Career)));
  84. controls.Add("IsDreamProject", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.IsDreamProject), Html.CheckBoxFor(x => x.IsDreamProject)));
  85. controls.Add("LiteracyLevels", new KeyValuePair<MvcHtmlString, MvcHtmlString>(Html.LabelFor(x => x.LiteracyLevels), Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LiteracyLevels, (x => x.LiteracyLevels))));
  86. }
  87. <style type="text/css">
  88. #Coursematerialtable {
  89. width: 100%;
  90. border: 0px none;
  91. }
  92. #Coursematerialtable tr {
  93. min-height: 30px;
  94. }
  95. /*防止遮盖列表按钮*/
  96. .popupWindowContent {
  97. top: 70px;
  98. }
  99. </style>
  100. @section scripts{
  101. <script src="~/Scripts/Business/Cultureplan/CoursematerialEdit.js" type="text/javascript"></script>
  102. <script type="text/javascript">
  103. function ChangeMaterial_Update() {
  104. $(document.forms[0]).submit(); //提交Form表单
  105. }
  106. </script>
  107. }
  108. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  109. @Html.Position()
  110. @using (Html.BeginForm("ChangeSave", "StudentRecord", new { MNU = Request["MNU"] }, FormMethod.Post,
  111. new { enctype = "multipart/form-data" }))
  112. {
  113. <div class="p_title">
  114. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  115. 学生详细信息
  116. </div>
  117. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  118. </div>
  119. <div class="search_list">
  120. @*<input id="files" type="file" onchange="previewImage(this, 'prvid')" multiple="multiple"/>
  121. <div style="height:300px; width:330px;" id="prvid">预览容器</div>*@
  122. <table cellpadding="0" cellspacing="0" id="Coursematerialtable">
  123. <tr>
  124. <td style=" text-align:right; width:20%">
  125. 名称
  126. </td>
  127. <td style=" width:35%">
  128. 修改前
  129. </td>
  130. <td style="width:35%">
  131. 修改后
  132. </td>
  133. </tr>
  134. @foreach (var type in TypeNames)
  135. {
  136. foreach (var Feild in ChangeFeilds.Where(q => q.TypeName == type).OrderBy(q => q.OrderBy))
  137. {
  138. <tr>
  139. <td style=" width:20%">
  140. @if (controls.Keys.Contains(Feild.ColumnFeild))
  141. {
  142. @controls[Feild.ColumnFeild].Key
  143. }
  144. </td>
  145. <td style=" width:35%">
  146. @if (!Feild.ColumnNmae.Contains("PhotoUrl"))//TODO:图片不需要显示路径
  147. {
  148. @Html.Display(Feild.ColumnNmae)
  149. }
  150. else
  151. {
  152. @MvcHtmlString.Create("<div><img src=\"" + Model.PhotoUrl + "\" width=120 height=160 /></div>")
  153. }
  154. </td>
  155. <td style=" width:35%">
  156. @if (Feild.IsChange && controls.Keys.Contains(Feild.ColumnFeild))
  157. {
  158. @controls[Feild.ColumnFeild].Value
  159. }
  160. else if (Feild.ColumnNmae == "PhotoUrl")
  161. {
  162. @MvcHtmlString.Create("<div><img src=\"" + Model.PhotoUrl + "\" width=120 height=160 /></div>")
  163. }
  164. else
  165. {
  166. @Html.Display(Feild.ColumnNmae)
  167. }
  168. </td>
  169. </tr>
  170. }
  171. }
  172. </table>
  173. </div>
  174. }
  175. </div>