Edit.cshtml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. @model EMIS.ViewModel.EnrollManage.SpecialtyManage.RecruitSpecialtyView
  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. var isEdit = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true);
  8. //院系所
  9. ComboGridOptions cgopCollege = new ComboGridOptions
  10. {
  11. TextField = "Name",
  12. ValueField = "CollegeID",
  13. IsEnabled = isEdit,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 },
  20. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  21. },
  22. PageSize = 5,
  23. IsCheckOnSelect = true,
  24. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  25. IsPagination = true,
  26. IsShowRowNumbers = true,
  27. IsSingleSelect = false
  28. }
  29. };
  30. //专业信息
  31. ComboGridOptions cgopSpecialty = new ComboGridOptions
  32. {
  33. TextField = "StandardName",
  34. ValueField = "SpecialtyID",
  35. OnSelect = "querySpecialty",
  36. IsEnabled = isEdit,
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. new LinkButtonColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, OrderFieldName="StandardCode", Width=0.1 },
  42. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, OrderFieldName="StandardName", Width=0.2 },
  43. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, OrderFieldName="EducationID", Width=0.12 },
  44. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, OrderFieldName="LearningformID", Width=0.12 },
  45. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
  46. new BoundFieldColumn { FieldName="RecordStatusStr", HeaderText="状态", Align=AlignStyle.Center, OrderFieldName="RecordStatus", Width=0.12 }
  47. },
  48. PageSize = 5,
  49. IsCheckOnSelect = true,
  50. DataSourceUrl = Url.Content("~/Specialty/GetEnableAndUseSpecialtyView" + "?specialtyID=" + Model.SpecialtyID),
  51. IsPagination = true,
  52. IsShowRowNumbers = true,
  53. IsSingleSelect = false,
  54. }
  55. };
  56. }
  57. @section scripts{
  58. <script src="~/Scripts/Business/EnrollManage/SpecialtyManage/RecruitSpecialtyEdit.js" type="text/javascript"></script>
  59. }
  60. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  61. @using (Ajax.BeginForm(new AjaxOptions
  62. {
  63. OnSuccess = "EMISFunction.FormSuccess",
  64. OnBegin = "EMISFunction.FormSubmit",
  65. OnComplete = "EMISFunction.FormComplete"
  66. }))
  67. {
  68. <div class="p_title">
  69. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  70. @if (Request["type"] != "detail")
  71. {
  72. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  73. }
  74. </div>
  75. <div class="search_list">
  76. @Html.HiddenFor(x => x.RecruitSpecialtyID)
  77. <table cellpadding="0" cellspacing="0" id="recruitspecialtytable">
  78. <tr>
  79. <td style="color:red;">
  80. @Html.LabelFor(x => x.CollegeName):
  81. </td>
  82. <td>
  83. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  84. </td>
  85. <td style="color:red;">
  86. @Html.LabelFor(x => x.GradeID):
  87. </td>
  88. <td>
  89. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.GradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEdit })
  90. </td>
  91. </tr>
  92. <tr>
  93. <td style="color:red;">
  94. @Html.LabelFor(x => x.StandardName):
  95. </td>
  96. <td>
  97. @Html.ComboGridFor(x => x.SpecialtyID, cgopSpecialty)
  98. </td>
  99. <td style="color:red;">
  100. @Html.LabelFor(x => x.SemesterID):
  101. </td>
  102. <td>
  103. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Semester, (x => x.SemesterID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEdit })
  104. </td>
  105. </tr>
  106. <tr>
  107. <td style="color:red;">
  108. @Html.LabelFor(x => x.Code):
  109. </td>
  110. <td>
  111. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = false })
  112. </td>
  113. <td style="color:red;">
  114. @Html.LabelFor(x => x.EducationID):
  115. </td>
  116. <td>
  117. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  118. </td>
  119. </tr>
  120. <tr>
  121. <td style="color:red;">
  122. @Html.LabelFor(x => x.LearningformID):
  123. </td>
  124. <td>
  125. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  126. </td>
  127. <td style="color:red;">
  128. @Html.LabelFor(x => x.LearnSystem):
  129. </td>
  130. <td>
  131. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false })
  132. </td>
  133. </tr>
  134. <tr>
  135. <td>
  136. @Html.LabelFor(x => x.isGenerated):
  137. </td>
  138. <td>
  139. @Html.TextBoxFor(x => x.isGeneratedName, new TextBoxOptions() { IsEnabled = false })
  140. </td>
  141. <td>
  142. @Html.LabelFor(x => x.ScienceclassID):
  143. </td>
  144. <td>
  145. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Scienceclass, (x => x.ScienceclassID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>
  150. @Html.LabelFor(x => x.Remark):
  151. </td>
  152. <td colspan="3">
  153. @if (!isEnable)
  154. {
  155. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  156. {
  157. { "style", "width: 90%;min-height: 50px" },
  158. { "disabled", "true" }
  159. })
  160. }
  161. else
  162. {
  163. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  164. {
  165. { "style", "width: 90%;min-height: 50px" }
  166. })
  167. }
  168. </td>
  169. </tr>
  170. </table>
  171. </div>
  172. }
  173. </div>