Edit.cshtml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. @model EMIS.ViewModel.Cultureplan.CoursematerialView
  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 cgopTeachType = new ComboGridOptions
  9. {
  10. TextField = "ClassName",
  11. ValueField = "ClassGroupingID",
  12. ID = "TeachTypeDropdown",
  13. Name = "TeachTypeDropdown",
  14. IsEnabled = isEnable,
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. new BoundFieldColumn { FieldName="ClassName", HeaderText="上课类型", Align=AlignStyle.Center, Width=0.12 }
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/TeachType/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. }
  30. @section scripts{
  31. <script src="~/Scripts/Business/CultureplanManage/CoursematerialEdit.js" type="text/javascript"></script>
  32. <script type="text/javascript">
  33. var nonSelect = "@DropdownList.SELECT_ALL";
  34. </script>
  35. }
  36. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  37. @using (Ajax.BeginForm(new AjaxOptions
  38. {
  39. OnSuccess = "EMISFunction.FormSuccess",
  40. OnBegin = "EMISFunction.FormSubmit",
  41. OnComplete = "EMISFunction.FormComplete"
  42. }))
  43. {
  44. <div class="p_title">
  45. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  46. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  47. @if (Request["type"] != "detail")
  48. {
  49. @Html.ContextMenuBar("Edit")
  50. }
  51. </div>
  52. </div>
  53. <div class="search_list">
  54. @Html.HiddenFor(x => x.CoursematerialID)
  55. <table cellpadding="0" cellspacing="0" id="Coursematerialtable">
  56. <tr>
  57. <td style="color:red;">
  58. @Html.LabelFor(x => x.CourseCode):
  59. </td>
  60. <td>
  61. @Html.TextBoxFor(x => x.CourseCode, new TextBoxOptions() { IsEnabled = isEnable })
  62. </td>
  63. <td style="color:red;">
  64. @Html.LabelFor(x => x.CourseName):
  65. </td>
  66. <td>
  67. @Html.TextBoxFor(x => x.CourseName, new TextBoxOptions() { IsEnabled = isEnable })
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>
  72. @Html.LabelFor(x => x.Abbreviation):
  73. </td>
  74. <td>
  75. @Html.TextBoxFor(x => x.Abbreviation, new TextBoxOptions() { IsEnabled = isEnable })
  76. </td>
  77. <td>
  78. @Html.LabelFor(x => x.EnglishName):
  79. </td>
  80. <td>
  81. @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>
  86. @Html.LabelFor(x => x.StandardName):
  87. </td>
  88. <td>
  89. @Html.TextBoxFor(x => x.StandardName, new TextBoxOptions() { IsEnabled = isEnable })
  90. </td>
  91. <td>
  92. @Html.LabelFor(x => x.CourseEdition):
  93. </td>
  94. <td>
  95. @Html.TextBoxFor(x => x.CourseEdition, new TextBoxOptions() { IsEnabled = isEnable })
  96. </td>
  97. </tr>
  98. <tr>
  99. <td>
  100. @Html.LabelFor(x => x.CourseLevelID):
  101. </td>
  102. <td>
  103. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseLevel, (x => x.CourseLevelID), new DropdownListOptions() { IsEnabled = isEnable })
  104. </td>
  105. <td>
  106. @Html.LabelFor(x => x.CourseScienceID):
  107. </td>
  108. <td>
  109. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseScience, (x => x.CourseScienceID), new DropdownListOptions() { IsEnabled = isEnable })
  110. </td>
  111. </tr>
  112. <tr>
  113. <td style="color:red;">
  114. @Html.LabelFor(x => x.ClassName):
  115. </td>
  116. <td>
  117. @Html.ComboGridFor(x => x.ClassGroupingID, cgopTeachType)
  118. </td>
  119. <td style="color:red;">
  120. @Html.LabelFor(x => x.IsEnable):
  121. </td>
  122. <td>
  123. @if (!isEnable)
  124. {
  125. @Html.CheckBoxFor(x => x.IsEnable, new Dictionary<string, object>() { { "disabled", isEnable } })
  126. }
  127. else
  128. {
  129. @Html.CheckBoxFor(x => x.IsEnable)
  130. }
  131. </td>
  132. </tr>
  133. <tr>
  134. <td>
  135. @Html.LabelFor(x => x.CourseSynopsis):
  136. </td>
  137. <td colspan="3">
  138. @if (!isEnable)
  139. {
  140. @Html.TextAreaFor(x => x.CourseSynopsis, new Dictionary<string, object>
  141. {
  142. { "style", "width: 90%;min-height: 45px" },
  143. { "disabled", "true" }
  144. })
  145. }
  146. else
  147. {
  148. @Html.TextAreaFor(x => x.CourseSynopsis, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  149. }
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.CourseReserve):
  155. </td>
  156. <td colspan="3">
  157. @if (!isEnable)
  158. {
  159. @Html.TextAreaFor(x => x.CourseReserve, new Dictionary<string, object>
  160. {
  161. { "style", "width: 90%;min-height: 40px" },
  162. { "disabled", "true" }
  163. })
  164. }
  165. else
  166. {
  167. @Html.TextAreaFor(x => x.CourseReserve, new Dictionary<string, object> { { "style", "width: 90%;min-height: 40px" } })
  168. }
  169. </td>
  170. </tr>
  171. <tr>
  172. <td>
  173. @Html.LabelFor(x => x.Remark):
  174. </td>
  175. <td colspan="3">
  176. @if (!isEnable)
  177. {
  178. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  179. {
  180. { "style", "width: 90%;min-height: 30px" },
  181. { "disabled", "true" }
  182. })
  183. }
  184. else
  185. {
  186. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 30px" } })
  187. }
  188. </td>
  189. </tr>
  190. </table>
  191. </div>
  192. }
  193. </div>