Edit.cshtml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. @model EMIS.ViewModel.UniversityManage.SpecialtyClassManage.FacultymajorView
  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/ListOnlyCollege"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. }
  30. @section scripts{
  31. <script src="~/Scripts/Business/UniversityManage/SpecialtyClassManage/FacultymajorEdit.js" type="text/javascript"></script>
  32. <script type="text/javascript">
  33. </script>
  34. }
  35. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  36. @using (Ajax.BeginForm(new AjaxOptions
  37. {
  38. OnSuccess = "EMISFunction.FormSuccess",
  39. OnBegin = "EMISFunction.FormSubmit",
  40. OnComplete = "EMISFunction.FormComplete"
  41. }))
  42. {
  43. <div class="p_title">
  44. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  45. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  46. @if (Request["type"] != "detail")
  47. {
  48. @Html.ContextMenuBar("Edit")
  49. }
  50. </div>
  51. </div>
  52. <div class="search_list">
  53. @Html.HiddenFor(x => x.FacultymajorID)
  54. <table cellpadding="0" cellspacing="0" id="facultymajortable">
  55. <tr>
  56. <td>
  57. @Html.LabelFor(x => x.Code):
  58. </td>
  59. <td>
  60. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  61. </td>
  62. <td>
  63. @Html.LabelFor(x => x.Name):
  64. </td>
  65. <td>
  66. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>
  71. @Html.LabelFor(x => x.Abbreviation):
  72. </td>
  73. <td>
  74. @Html.TextBoxFor(x => x.Abbreviation, new TextBoxOptions() { IsEnabled = isEnable })
  75. </td>
  76. <td>
  77. @Html.LabelFor(x => x.EnglishName):
  78. </td>
  79. <td>
  80. @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
  81. </td>
  82. </tr>
  83. <tr>
  84. <td style="color:red;">
  85. @Html.LabelFor(x => x.CollegeID):
  86. </td>
  87. <td>
  88. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  89. </td>
  90. <td style="color:red;">
  91. @Html.LabelFor(x => x.StandardName):
  92. </td>
  93. <td>
  94. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.StandardID), DropdownListBindType.PleaseSelect,
  95. new ComboGridOptions
  96. {
  97. IsEnabled = isEnable,
  98. GridOptions = new DataGridOptions
  99. {
  100. Columns = new List<DataGridColumn>()
  101. {
  102. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  103. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  104. }
  105. }
  106. })
  107. </td>
  108. </tr>
  109. <tr>
  110. <td style="color:red;">
  111. @Html.LabelFor(x => x.EducationID):
  112. </td>
  113. <td>
  114. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  115. </td>
  116. <td style="color:red;">
  117. @Html.LabelFor(x => x.LearningformID):
  118. </td>
  119. <td>
  120. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), new DropdownListOptions() { IsEnabled = isEnable })*@
  121. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  122. </td>
  123. </tr>
  124. <tr>
  125. <td style="color:red;">
  126. @Html.LabelFor(x => x.LearnSystem):
  127. </td>
  128. <td>
  129. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = isEnable })
  130. </td>
  131. <td>
  132. @Html.LabelFor(x => x.ScienceclassID):
  133. </td>
  134. <td>
  135. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Scienceclass, (x => x.ScienceclassID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>
  140. @Html.LabelFor(x => x.LearningstyleID):
  141. </td>
  142. <td>
  143. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningstyle, (x => x.LearningstyleID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  144. </td>
  145. <td>
  146. @Html.LabelFor(x => x.LearnPositionID):
  147. </td>
  148. <td>
  149. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_LearnPosition, (x => x.LearnPositionID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.TeacherIdentification):
  155. </td>
  156. <td>
  157. @Html.TextBoxFor(x => x.TeacherIdentification, new TextBoxOptions() { IsEnabled = isEnable })
  158. </td>
  159. <td>
  160. @Html.LabelFor(x => x.SetTime):
  161. </td>
  162. <td>
  163. @Html.TextBoxFor(x => x.SetTime, new TextBoxOptions { TextBoxType = TextBoxType.Date, 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>