Edit.cshtml 6.2 KB

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