Edit.cshtml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. @model EMIS.ViewModel.TeachingMaterial.TeachingMaterialPoolView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var textAreaHtmlAttributes = new Dictionary<string, object> { { "style", "width:500px;" } };
  7. if (true)
  8. {
  9. textAreaHtmlAttributes.Add("readonly", "readonly");
  10. }
  11. ComboGridOptions Psop = new ComboGridOptions
  12. {
  13. TextField = "UnitName",
  14. ValueField = "PublishID",
  15. ID = "PublishDropdown",
  16. Name = "PublishDropdown",
  17. IsEnabled = false,
  18. OnSelect = "QueryPublishDropdownList",
  19. GridOptions = new DataGridOptions
  20. {
  21. Columns = new List<DataGridColumn>()
  22. {
  23. new BoundFieldColumn { FieldName="UnitName", Align=AlignStyle.Center }
  24. },
  25. IsCheckOnSelect = true,
  26. DataSourceUrl = Url.Content("~/Publisher/List"),
  27. IsPagination = true,
  28. IsShowRowNumbers = true,
  29. IsSingleSelect = false
  30. }
  31. };
  32. ComboGridOptions Csop = new ComboGridOptions
  33. {
  34. TextField = "CourseName",
  35. ValueField = "CoursematerialID",
  36. ID = "CourseDropdown",
  37. Name = "CourseDropdown",
  38. IsEnabled = false,
  39. OnSelect = "QueryCourseDropdownList",
  40. GridOptions = new DataGridOptions
  41. {
  42. Columns = new List<DataGridColumn>()
  43. {
  44. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  45. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  46. },
  47. IsCheckOnSelect = true,
  48. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  49. IsPagination = true,
  50. IsShowRowNumbers = true,
  51. IsSingleSelect = false
  52. }
  53. };
  54. }
  55. @section scripts{
  56. <script src="../../Scripts/Business/TeachingMaterial/TeachingMaterialPool.js" type="text/javascript"></script>
  57. <script type="text/javascript">
  58. //保存
  59. function TeachingMateriaInventory_Save() {
  60. $(document.forms[0]).submit();
  61. }
  62. </script>
  63. }
  64. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  65. @using (Ajax.BeginForm(new AjaxOptions { Url = "/TeachingMateriaInventory/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  66. {
  67. @Html.HiddenFor(x => x.TeachingMaterialPoolID)
  68. <div class="p_title">
  69. @* <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  70. 教材基本信息
  71. </div>*@
  72. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  73. </div>
  74. <div class="search_list">
  75. <table cellpadding="0" cellspacing="0">
  76. <tr>
  77. <td>@Html.LabelFor(x => x.TeachingMaterialCode):
  78. </td>
  79. <td>@Html.DisplayFor(x => x.TeachingMaterialCode, new { @readonly = "readonly" })
  80. </td>
  81. <td>@Html.LabelFor(x => x.TeachingMaterialName):
  82. </td>
  83. <td>@Html.DisplayFor(x => x.TeachingMaterialName, new { @readonly = "readonly" })
  84. </td>
  85. </tr>
  86. <tr>
  87. <td>@Html.LabelFor(x => x.TeachingMaterialShorName):
  88. </td>
  89. <td>@Html.DisplayFor(x => x.TeachingMaterialShorName, new { @readonly = "readonly" })
  90. </td>
  91. <td>@Html.LabelFor(x => x.ISBN):
  92. </td>
  93. <td>@Html.DisplayFor(x => x.ISBN, new { @readonly = "readonly" })
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>@Html.LabelFor(x => x.TeachingMaterialTypeID):
  98. </td>
  99. <td>
  100. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_TeachingMaterialType, x => x.TeachingMaterialTypeID, new DropdownListOptions { IsEnabled = false })
  101. </td>
  102. <td>@Html.LabelFor(x => x.PublishName):
  103. </td>
  104. <td>
  105. @Html.ComboGridFor(x => x.PublishID, Psop)
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>@Html.LabelFor(x => x.PublishTime):
  110. </td>
  111. <td>@Html.TextBoxFor(x => x.PublishTime)
  112. </td>
  113. <td>@Html.LabelFor(x => x.WnningLevel):
  114. </td>
  115. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_WnningLevel, x => x.WnningLevel, new DropdownListOptions { IsEnabled = false })
  116. </td>
  117. </tr>
  118. <tr>
  119. <td>@Html.LabelFor(x => x.Author):
  120. </td>
  121. <td>
  122. @Html.DisplayFor(x => x.Author, new { @readonly = "readonly" })
  123. </td>
  124. <td>@Html.LabelFor(x => x.Price):
  125. </td>
  126. <td>
  127. @Html.DisplayFor(x => x.Price, new { @readonly = "readonly" })
  128. </td>
  129. </tr>
  130. <tr>
  131. <td>@Html.LabelFor(x => x.MinInventory):
  132. </td>
  133. <td>
  134. @Html.TextBoxFor(x => x.MinInventory)
  135. </td>
  136. <td>&nbsp;
  137. </td>
  138. <td>&nbsp;
  139. </td>
  140. </tr>
  141. <tr>
  142. <td>@Html.LabelFor(x => x.CoursematerialName):
  143. </td>
  144. <td colspan="3">
  145. @Html.DataGrid(new DataGridOptions
  146. {
  147. Columns = new List<DataGridColumn>()
  148. {
  149. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  150. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, OverflowLength=36, Width=0.3 },
  151. new BoundFieldColumn { FieldName="CourseLevelName", HeaderText="课程级别", Align=AlignStyle.Center, Width=0.1 },
  152. new BoundFieldColumn { FieldName="CourseScienceName", HeaderText="课程科类码", Align=AlignStyle.Center, Width=0.2 },
  153. new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.08 }
  154. },
  155. IsPostBack = true,
  156. IsCheckOnSelect = true,
  157. DataSourceUrl = Url.Content("~/TeachingMaterialPool/GetTeachingMaterialPoolCoursematerialList?teachingMaterialPoolID=" + Model.TeachingMaterialPoolID),
  158. ID = "dgCoursematerialList",
  159. IsPagination = false,
  160. IsShowRowNumbers = true,
  161. IsSingleSelect = false
  162. })
  163. </td>
  164. </tr>
  165. <tr>
  166. <td>@Html.LabelFor(x => x.Desc):
  167. </td>
  168. <td colspan="3">@Html.DisplayFor(x => x.Desc, new { @readonly = "readonly" })
  169. </td>
  170. </tr>
  171. </table>
  172. </div>
  173. }
  174. </div>