Edit.cshtml 9.5 KB

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