Edit.cshtml 7.0 KB

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