Edits.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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>@Html.SingleUploaderFor(x => x.PhotoUrl, new Dictionary<string, object> { { "style", "width:100px;" },
  75. { "accept", "*.jpg;*.jpeg;*.png;*.bmp" } })
  76. <input type="button" value="删除" onclick="javascript: delPhoto();" />
  77. </span>
  78. </div>
  79. </td>
  80. </tr>
  81. <tr>
  82. <td>@Html.LabelFor(x => x.Name):</td>
  83. <td>@Html.TextBoxFor(x => x.Name)</td>
  84. </tr>
  85. <tr>
  86. <td>@Html.LabelFor(x => x.UsedName):</td>
  87. <td>@Html.TextBoxFor(x => x.UsedName)</td>
  88. </tr>
  89. <tr>
  90. <td>@Html.LabelFor(x => x.Sex):</td>
  91. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.Sex))</td>
  92. </tr>
  93. <tr>
  94. <td>@Html.LabelFor(x => x.CollegeName):</td>
  95. <td>@Html.ComboGridFor(x => x.CollegeID, cgop)</td>
  96. <td>@Html.LabelFor(x => x.DepartmentName):</td>
  97. <td>@Html.ComboGridFor(x => x.DepartmentID, cgopdepart)</td>
  98. </tr>
  99. <tr>
  100. <td>@Html.LabelFor(x => x.TeacherType):</td>
  101. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_TeacherType, (x => x.TeacherType))</td>
  102. <td>@Html.LabelFor(x => x.IncumbencyState):</td>
  103. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_IncumbencyState, (x => x.IncumbencyState))</td>
  104. </tr>
  105. <tr>
  106. <td>
  107. @Html.LabelFor(x => x.BirthDate):
  108. </td>
  109. <td>
  110. @Html.TextBoxFor(x => x.BirthDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  111. </td>
  112. <td>@Html.LabelFor(x => x.TeachingDate):</td>
  113. <td>@Html.TextBoxFor(x => x.TeachingDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month })</td>
  114. </tr>
  115. <tr>
  116. <td>@Html.LabelFor(x => x.Nation):</td>
  117. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Nation, (x => x.Nation))</td>
  118. <td>@Html.LabelFor(x => x.Place):</td>
  119. <td>@Html.TextBoxFor(x => x.Place)</td>
  120. </tr>
  121. <tr>
  122. <td>@Html.LabelFor(x => x.EducationCode):</td>
  123. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_EducationCode, (x => x.EducationCode))</td>
  124. <td>@Html.LabelFor(x => x.Telephone):</td>
  125. <td>@Html.TextBoxFor(x => x.Telephone)</td>
  126. </tr>
  127. <tr>
  128. <td>@Html.LabelFor(x => x.OfficeTelephone):</td>
  129. <td>@Html.TextBoxFor(x => x.OfficeTelephone)</td>
  130. <td>@Html.LabelFor(x => x.Mobile):</td>
  131. <td>@Html.TextBoxFor(x => x.Mobile)</td>
  132. </tr>
  133. <tr>
  134. <td>@Html.LabelFor(x => x.Email):</td>
  135. <td>@Html.TextBoxFor(x => x.Email)</td>
  136. <td>@Html.LabelFor(x => x.QQ):</td>
  137. <td>@Html.TextBoxFor(x => x.QQ)</td>
  138. </tr>
  139. <tr>
  140. <td>@Html.LabelFor(x => x.Nationality):</td>
  141. <td>@Html.TextBoxFor(x => x.Nationality)</td>
  142. <td>@Html.LabelFor(x => x.HealthState):</td>
  143. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HealthState, (x => x.HealthState))</td>
  144. </tr>
  145. <tr>
  146. <td>@Html.LabelFor(x => x.HousePhone):</td>
  147. <td>@Html.TextBoxFor(x => x.HousePhone)</td>
  148. <td>@Html.LabelFor(x => x.Address):</td>
  149. <td>@Html.TextBoxFor(x => x.Address)</td>
  150. </tr>
  151. <tr>
  152. <td>@Html.LabelFor(x => x.Postcode):</td>
  153. <td>@Html.TextBoxFor(x => x.Postcode)</td>
  154. <td>@Html.LabelFor(x => x.HomeAddress):</td>
  155. <td>@Html.TextBoxFor(x => x.HomeAddress)</td>
  156. </tr>
  157. <tr>
  158. <td>@Html.LabelFor(x => x.NowAddress):</td>
  159. <td>@Html.TextBoxFor(x => x.NowAddress)</td>
  160. <td>@Html.LabelFor(x => x.Residence):</td>
  161. <td>@Html.TextBoxFor(x => x.Residence)</td>
  162. </tr>
  163. <tr>
  164. <td>@Html.LabelFor(x => x.Religion):</td>
  165. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Religion, (x => x.Religion))</td>
  166. <td>@Html.LabelFor(x => x.CertificatesType):</td>
  167. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CertificatesType, (x => x.CertificatesType))</td>
  168. </tr>
  169. <tr>
  170. <td>@Html.LabelFor(x => x.CertificatesNum):</td>
  171. <td>@Html.TextBoxFor(x => x.CertificatesNum)</td>
  172. <td>@Html.LabelFor(x => x.Situation):</td>
  173. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Situation, (x => x.Situation))</td>
  174. </tr>
  175. <tr>
  176. <td>@Html.LabelFor(x => x.LiteracyLevels):</td>
  177. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LiteracyLevels, (x => x.LiteracyLevels))</td>
  178. <td>@Html.LabelFor(x => x.Title):</td>
  179. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Title, (x => x.Title))</td>
  180. </tr>
  181. <tr>
  182. <td>@Html.LabelFor(x => x.PaymentLevelID):</td>
  183. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.TP_PaymentLevel, (x => x.PaymentLevelID))</td>
  184. <td>@Html.LabelFor(x => x.IsDualTeacher):</td>
  185. <td>@Html.CheckBoxFor((x => x.IsDualTeacher))</td>
  186. </tr>
  187. <tr>
  188. <td>@Html.LabelFor(x => x.LearnPosition):</td>
  189. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_LearnPosition, (x => x.LearnPosition))</td>
  190. <td>@Html.LabelFor(x => x.DegreeState):</td>
  191. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_DegreeState, (x => x.DegreeState))</td>
  192. </tr>
  193. <tr>
  194. <td>@Html.LabelFor(x => x.WorkDate):</td>
  195. <td>@Html.TextBoxFor(x => x.WorkDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month })</td>
  196. <td>@Html.LabelFor(x => x.ComeSchoolDate):</td>
  197. <td>@Html.TextBoxFor(x => x.ComeSchoolDate, new TextBoxOptions() { TextBoxType = TextBoxType.Month })</td>
  198. </tr>
  199. <tr>
  200. <td>@Html.LabelFor(x => x.Speciality):</td>
  201. <td>@Html.TextBoxFor(x => x.Speciality)</td>
  202. <td>@Html.LabelFor(x => x.WeChatNum):</td>
  203. <td>@Html.TextBoxFor(x => x.WeChatNum)</td>
  204. </tr>
  205. <tr>
  206. <td>@Html.LabelFor(x => x.Account):</td>
  207. <td>@Html.TextBoxFor(x => x.Account)</td>
  208. <td>@Html.LabelFor(x => x.Profile):</td>
  209. <td>@Html.TextAreaFor(x => x.Profile, new Dictionary<string, string> { { "style", "width:500px;" } })</td>
  210. </tr>
  211. </table>
  212. </div>
  213. }
  214. </div>