Edit.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. @model EMIS.ViewModel.TeacherManagement.StaffView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. ComboGridOptions cgop = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "CollegeID",
  10. OnSelect = "QueryCollegeComboGridList",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Width=0.1, Align=AlignStyle.Center },
  16. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.3, Align=AlignStyle.Center }
  17. },
  18. IsCheckOnSelect = true,
  19. DataSourceUrl = Url.Content("~/College/List"),
  20. IsPagination = true,
  21. IsShowRowNumbers = true,
  22. IsSingleSelect = false
  23. }
  24. };
  25. ComboGridOptions cgopdepart = new ComboGridOptions
  26. {
  27. TextField = "Name",
  28. ValueField = "DepartmentID",
  29. GridOptions = new DataGridOptions
  30. {
  31. Columns = new List<DataGridColumn>()
  32. {
  33. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Width=0.1, Align=AlignStyle.Center },
  34. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Width=0.3, Align=AlignStyle.Center }
  35. },
  36. IsCheckOnSelect = true,
  37. DataSourceUrl = Url.Content("~/Department/List"),
  38. IsPagination = true,
  39. IsShowRowNumbers = true,
  40. IsSingleSelect = false
  41. }
  42. };
  43. }
  44. @section scripts{
  45. <script src="~/Scripts/Business/System/StaffEdit.js" type="text/javascript"></script>
  46. <script type="text/javascript">
  47. var nonSelect = "@DropdownList.SELECT_ALL";
  48. </script>
  49. }
  50. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  51. @using (Html.BeginForm("Edit", "Staff", new { Userid = Request["userID"], MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
  52. {
  53. <div class="p_title">
  54. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  55. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  56. @if (ViewBag.Type != "1")//控制列表进入、屏蔽按钮权限
  57. {
  58. @Html.ContextMenuBar("Edit")
  59. }
  60. </div>
  61. </div>
  62. <div class="search_list">
  63. @Html.HiddenFor(x => x.UserID)
  64. @Html.Hidden("CollegeDropdown", Model.CollegeID, new Dictionary<string, object> { { "data-condition", "DepartmentID_gridX" } })
  65. <table cellpadding="0" cellspacing="0" id="stafftable">
  66. <tr>
  67. <td>@Html.LabelFor(x => x.StaffCode):</td>
  68. <td>@Html.TextBoxFor(x => x.StaffCode)</td>
  69. <td rowspan="4">@Html.LabelFor(x => x.PhotoUrl):</td>
  70. <td rowspan="4">
  71. <div>
  72. <img src="@Model.PhotoUrl" id="imgPhoto" width="80" height="100" /></div>
  73. <div>
  74. <span>
  75. @Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary<string, object> { { "style", "width:100px;" },
  76. { "accept", "*.jpg;*.jpeg;*.png;*.bmp" } })
  77. <input type="button" value="删除" onclick="javascript: delPhoto();" />
  78. </span>
  79. </div>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>@Html.LabelFor(x => x.Name):</td>
  84. <td>@Html.TextBoxFor(x => x.Name)</td>
  85. </tr>
  86. <tr>
  87. <td>@Html.LabelFor(x => x.UsedName):</td>
  88. <td>@Html.TextBoxFor(x => x.UsedName)</td>
  89. </tr>
  90. <tr>
  91. <td>@Html.LabelFor(x => x.Sex):</td>
  92. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.Sex))</td>
  93. </tr>
  94. <tr>
  95. <td>@Html.LabelFor(x => x.CollegeName):</td>
  96. <td>@Html.ComboGridFor(x => x.CollegeID, cgop)</td>
  97. <td>@Html.LabelFor(x => x.DepartmentName):</td>
  98. <td>@Html.ComboGridFor(x => x.DepartmentID, cgopdepart)</td>
  99. </tr>
  100. <tr>
  101. <td>@Html.LabelFor(x => x.TeacherType):</td>
  102. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_TeacherType, (x => x.TeacherType))</td>
  103. <td>@Html.LabelFor(x => x.IncumbencyState):</td>
  104. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_IncumbencyState, (x => x.IncumbencyState))</td>
  105. </tr>
  106. <tr>
  107. <td>@Html.LabelFor(x => x.BirthDate):</td>
  108. <td>
  109. @Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  110. </td>
  111. <td>@Html.LabelFor(x => x.TeachingDate):</td>
  112. <td>@Html.TextBoxFor(x => x.TeachingDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month })</td>
  113. </tr>
  114. <tr>
  115. <td>@Html.LabelFor(x => x.Nation):</td>
  116. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.Nation))</td>
  117. <td>@Html.LabelFor(x => x.Place):</td>
  118. <td>@Html.TextBoxFor(x => x.Place)</td>
  119. </tr>
  120. <tr>
  121. <td>@Html.LabelFor(x => x.EducationCode):</td>
  122. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EducationCode, (x => x.EducationCode))</td>
  123. <td>@Html.LabelFor(x => x.Telephone):</td>
  124. <td>@Html.TextBoxFor(x => x.Telephone)</td>
  125. </tr>
  126. <tr>
  127. <td>@Html.LabelFor(x => x.OfficeTelephone):</td>
  128. <td>@Html.TextBoxFor(x => x.OfficeTelephone)</td>
  129. <td>@Html.LabelFor(x => x.Mobile):</td>
  130. <td>@Html.TextBoxFor(x => x.Mobile)</td>
  131. </tr>
  132. <tr>
  133. <td>@Html.LabelFor(x => x.Email):</td>
  134. <td>@Html.TextBoxFor(x => x.Email)</td>
  135. <td>@Html.LabelFor(x => x.QQ):</td>
  136. <td>@Html.TextBoxFor(x => x.QQ)</td>
  137. </tr>
  138. <tr>
  139. <td>@Html.LabelFor(x => x.Nationality):</td>
  140. <td>@Html.TextBoxFor(x => x.Nationality)</td>
  141. <td>@Html.LabelFor(x => x.HealthState):</td>
  142. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.HealthState))</td>
  143. </tr>
  144. <tr>
  145. <td>@Html.LabelFor(x => x.HousePhone):</td>
  146. <td>@Html.TextBoxFor(x => x.HousePhone)</td>
  147. <td>@Html.LabelFor(x => x.Address):</td>
  148. <td>@Html.TextBoxFor(x => x.Address)</td>
  149. </tr>
  150. <tr>
  151. <td>@Html.LabelFor(x => x.Postcode):</td>
  152. <td>@Html.TextBoxFor(x => x.Postcode)</td>
  153. <td>@Html.LabelFor(x => x.HomeAddress):</td>
  154. <td>@Html.TextBoxFor(x => x.HomeAddress)</td>
  155. </tr>
  156. <tr>
  157. <td>@Html.LabelFor(x => x.NowAddress):</td>
  158. <td>@Html.TextBoxFor(x => x.NowAddress)</td>
  159. <td>@Html.LabelFor(x => x.Residence):</td>
  160. <td>@Html.TextBoxFor(x => x.Residence)</td>
  161. </tr>
  162. <tr>
  163. <td>@Html.LabelFor(x => x.Religion):</td>
  164. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Religion, (x => x.Religion))</td>
  165. <td>@Html.LabelFor(x => x.CertificatesType):</td>
  166. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType))</td>
  167. </tr>
  168. <tr>
  169. <td>@Html.LabelFor(x => x.CertificatesNum):</td>
  170. <td>@Html.TextBoxFor(x => x.CertificatesNum)</td>
  171. <td>@Html.LabelFor(x => x.Situation):</td>
  172. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Situation, (x => x.Situation))</td>
  173. </tr>
  174. <tr>
  175. <td>@Html.LabelFor(x => x.LiteracyLevels):</td>
  176. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LiteracyLevels, (x => x.LiteracyLevels))</td>
  177. <td>@Html.LabelFor(x => x.Title):</td>
  178. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Title, (x => x.Title))</td>
  179. </tr>
  180. <tr>
  181. <td>@Html.LabelFor(x => x.PaymentLevelID):</td>
  182. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.TP_PaymentLevel, (x => x.PaymentLevelID))</td>
  183. <td>@Html.LabelFor(x => x.IsDualTeacher):</td>
  184. <td>@Html.CheckBoxFor((x => x.IsDualTeacher))</td>
  185. </tr>
  186. <tr>
  187. <td>@Html.LabelFor(x => x.LearnPosition):</td>
  188. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LearnPosition, (x => x.LearnPosition))</td>
  189. <td>@Html.LabelFor(x => x.DegreeState):</td>
  190. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_DegreeState, (x => x.DegreeState))</td>
  191. </tr>
  192. <tr>
  193. <td>@Html.LabelFor(x => x.WorkDate):</td>
  194. <td>@Html.TextBoxFor(x => x.WorkDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month })</td>
  195. <td>@Html.LabelFor(x => x.ComeSchoolDate):</td>
  196. <td>@Html.TextBoxFor(x => x.ComeSchoolDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month })</td>
  197. </tr>
  198. <tr>
  199. <td>@Html.LabelFor(x => x.Speciality):</td>
  200. <td>@Html.TextBoxFor(x => x.Speciality)</td>
  201. <td>@Html.LabelFor(x => x.WeChatNum):</td>
  202. <td>@Html.TextBoxFor(x => x.WeChatNum)</td>
  203. </tr>
  204. <tr>
  205. <td>@Html.LabelFor(x => x.Profile):</td>
  206. <td colspan="3">@Html.TextAreaFor(x => x.Profile, new Dictionary<string, string> { { "style", "width:500px;" } })</td>
  207. </tr>
  208. </table>
  209. </div>
  210. }
  211. </div>