Edit.cshtml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. @model EMIS.ViewModel.UniversityManage.AdministrativeOrgan.CollegeView
  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 cgopCampus = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "CampusID",
  12. IsEnabled = isEnable,
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center ,Width=0.1 },
  18. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center ,Width=0.2 }
  19. },
  20. PageSize = 5,
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/Campus/List"),
  23. IsPagination = true,
  24. IsShowRowNumbers = true,
  25. IsSingleSelect = false
  26. }
  27. };
  28. ComboGridOptions cgopPoliticalManager = new ComboGridOptions
  29. {
  30. TextField = "Name",
  31. ValueField = "UserID",
  32. IsEnabled = isEnable,
  33. GridOptions = new DataGridOptions
  34. {
  35. Columns = new List<DataGridColumn>()
  36. {
  37. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1 },
  38. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1 },
  39. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.2 }
  40. },
  41. PageSize = 5,
  42. IsCheckOnSelect = true,
  43. DataSourceUrl = Url.Content("~/Staff/List"),
  44. IsPagination = true,
  45. IsShowRowNumbers = true,
  46. IsSingleSelect = false
  47. }
  48. };
  49. ComboGridOptions cgopAdministrativeManager = new ComboGridOptions
  50. {
  51. TextField = "Name",
  52. ValueField = "UserID",
  53. IsEnabled = isEnable,
  54. GridOptions = new DataGridOptions
  55. {
  56. Columns = new List<DataGridColumn>()
  57. {
  58. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1 },
  59. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1 },
  60. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.2 }
  61. },
  62. PageSize = 5,
  63. IsCheckOnSelect = true,
  64. DataSourceUrl = Url.Content("~/Staff/List"),
  65. IsPagination = true,
  66. IsShowRowNumbers = true,
  67. IsSingleSelect = false
  68. }
  69. };
  70. }
  71. @section scripts{
  72. <script src="~/Scripts/Business/UniversityManage/AdministrativeOrgan/CollegeEdit.js" type="text/javascript"></script>
  73. <script type="text/javascript">
  74. </script>
  75. }
  76. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  77. @using (Ajax.BeginForm(new AjaxOptions
  78. {
  79. OnSuccess = "EMISFunction.FormSuccess",
  80. OnBegin = "EMISFunction.FormSubmit",
  81. OnComplete = "EMISFunction.FormComplete"
  82. }))
  83. {
  84. <div class="p_title">
  85. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  86. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  87. @if (Request["type"] != "detail")
  88. {
  89. @Html.ContextMenuBar("Edit")
  90. }
  91. </div>
  92. </div>
  93. <div class="search_list">
  94. @Html.HiddenFor(x => x.CollegeID)
  95. <table cellpadding="0" cellspacing="0" id="universitytable">
  96. <tr>
  97. <td>
  98. @Html.LabelFor(x => x.No):
  99. </td>
  100. <td>
  101. @Html.TextBoxFor(x => x.No, new TextBoxOptions() { IsEnabled = isEnable })
  102. </td>
  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.SimpleName):
  113. </td>
  114. <td>
  115. @Html.TextBoxFor(x => x.SimpleName, new TextBoxOptions() { IsEnabled = isEnable })
  116. </td>
  117. <td>
  118. @Html.LabelFor(x => x.EnglishName):
  119. </td>
  120. <td>
  121. @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
  122. </td>
  123. </tr>
  124. <tr>
  125. <td>
  126. @Html.LabelFor(x => x.CampusName):
  127. </td>
  128. <td>
  129. @Html.ComboGridFor(x => x.CampusID, cgopCampus)
  130. </td>
  131. <td style="color:red;">
  132. @Html.LabelFor(x => x.UnitCategoryName):
  133. </td>
  134. <td>
  135. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_UnitCategory, (x => x.UnitCategoryID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>
  140. @Html.LabelFor(x => x.PoliticalManagerName):
  141. </td>
  142. <td>
  143. @Html.ComboGridFor(x => x.PoliticalManager, cgopPoliticalManager)
  144. </td>
  145. <td>
  146. @Html.LabelFor(x => x.AdministrativeManagerName):
  147. </td>
  148. <td>
  149. @Html.ComboGridFor(x => x.AdministrativeManager, cgopAdministrativeManager)
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.FoundDate):
  155. </td>
  156. <td>
  157. @Html.TextBoxFor(x => x.FoundDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  158. </td>
  159. <td>
  160. @Html.LabelFor(x => x.Officephone):
  161. </td>
  162. <td>
  163. @Html.TextBoxFor(x => x.Officephone, new TextBoxOptions() { IsEnabled = isEnable })
  164. </td>
  165. </tr>
  166. <tr>
  167. <td>
  168. @Html.LabelFor(x => x.Remark):
  169. </td>
  170. <td colspan="3">
  171. @if (!isEnable)
  172. {
  173. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  174. {
  175. { "style", "width: 90%;min-height: 60px" },
  176. { "disabled", "true" }
  177. })
  178. }
  179. else
  180. {
  181. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  182. }
  183. </td>
  184. </tr>
  185. </table>
  186. </div>
  187. }
  188. </div>