Edit.cshtml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. @model EMIS.ViewModel.SupervisionManage.LessonRecordView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Web.Controls;
  4. @{
  5. String SchoolYearID = ViewBag.SchoolYearID;
  6. ViewBag.Title = "List";
  7. }
  8. @section scripts{
  9. <script type="text/javascript">
  10. var windowID = '@(Request["WindowID"])';
  11. var nonSelect = "@DropdownList.SELECT_ALL";
  12. </script>
  13. <script src="~/Scripts/Business/SupervisionManage/LessonRecordEdit.js" type="text/javascript"></script>
  14. }
  15. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  16. {
  17. @Html.HiddenFor(x => x.LessonRecordID)
  18. @Html.HiddenFor(x => x.CreateUserID)
  19. <div class="p_title">
  20. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  21. 听课记录
  22. </div>
  23. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@(Request["isShow"] == "1" ? new MvcHtmlString("") : Html.ContextMenuBar("Edit"))</div>
  24. </div>
  25. <div class="search_list popupWindowContent" style="overflow: scroll;">
  26. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  27. <tr>
  28. <td>@Html.LabelFor(x => x.SchoolyearID)</td>
  29. <td colspan="3">@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/DropDownBeforeCurrent"), SelectedValue = BaseExtensions.GetCurrentSchoolYearID() })</td>
  30. </tr>
  31. <tr>
  32. <td>
  33. @Html.LabelFor(x => x.CreateUserID):
  34. </td>
  35. <td>
  36. @Html.DisplayFor(x => x.CreateUserName)
  37. </td>
  38. <td>
  39. @Html.LabelFor(x => x.SupervisionCollegeID):
  40. </td>
  41. <td>
  42. @Html.DropdownListFor((x => x.SupervisionCollegeID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SupervisionCollege/Dropdown"), SelectedValue = Model.SupervisionCollegeID })
  43. </td>
  44. </tr>
  45. <tr>
  46. <td>
  47. @Html.LabelFor(x => x.LessonDate):
  48. </td>
  49. <td>
  50. @Html.TextBoxFor(x => x.LessonDate, new TextBoxOptions { TextBoxType = TextBoxType.Date, OnSelect = "LessonDateChange" })
  51. </td>
  52. <td>
  53. @Html.LabelFor(x => x.Location):
  54. </td>
  55. <td>
  56. @Html.TextBoxFor(x => x.Location, new TextBoxOptions { })
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>
  61. @Html.LabelFor(x => x.Weekday):
  62. </td>
  63. <td>
  64. @Html.WeekdayDropDownListFor(x => x.Weekday, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, OnSelect = "GetClassmajorAndCourse" })
  65. </td>
  66. <td>
  67. @Html.LabelFor(x => x.CoursesTimeID):
  68. </td>
  69. <td>
  70. @Html.DropdownListFor(x => x.CoursesTimeID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, OnSelect = "GetClassmajorAndCourse", ItemSourceUrl = Url.Content("~/CoursesTime/DropDownForSegment") })
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>
  75. @Html.LabelFor(x => x.UserID):
  76. </td>
  77. <td>
  78. @Html.ComboGridFor(x => x.UserID, new ComboGridOptions
  79. {
  80. TextField = "Name",
  81. ValueField = "UserID",
  82. OnSelect = "GetClassmajorAndCourse",
  83. GridOptions = new DataGridOptions
  84. {
  85. Columns = new List<DataGridColumn>()
  86. {
  87. new BoundFieldColumn { FieldName="Name", HeaderText="教师姓名", Width=0.1, Align=AlignStyle.Center }
  88. },
  89. IsCheckOnSelect = true,
  90. DataSourceUrl = Url.Content("~/Staff/ListWithNoDataRange"),
  91. IsPagination = true,
  92. IsShowRowNumbers = true,
  93. IsSingleSelect = false,
  94. IsAutoLoad = true
  95. }
  96. })
  97. </td>
  98. <td>
  99. @Html.LabelFor(x => x.ClassmajorID):
  100. </td>
  101. <td>
  102. @Html.ComboGridFor(x => x.ClassmajorID, new ComboGridOptions
  103. {
  104. TextField = "Name",
  105. ValueField = "ClassmajorID",
  106. GridOptions = new DataGridOptions
  107. {
  108. Columns = new List<DataGridColumn>()
  109. {
  110. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.2 }
  111. },
  112. IsCheckOnSelect = true,
  113. DataSourceUrl = Url.Content("~/Classmajor/ListForInschool"),
  114. IsPagination = true,
  115. IsShowRowNumbers = true,
  116. IsSingleSelect = false
  117. }
  118. })
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>
  123. @Html.LabelFor(x => x.CoursematerialID):
  124. </td>
  125. <td>
  126. @Html.ComboGridFor(x => x.CoursematerialID, new ComboGridOptions
  127. {
  128. TextField = "CourseName",
  129. ValueField = "CoursematerialID",
  130. GridOptions = new DataGridOptions
  131. {
  132. Columns = new List<DataGridColumn>()
  133. {
  134. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.12 },
  135. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 }
  136. },
  137. IsCheckOnSelect = true,
  138. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  139. IsPagination = true,
  140. IsShowRowNumbers = true,
  141. IsSingleSelect = false,
  142. }
  143. })
  144. </td>
  145. <td>
  146. @Html.LabelFor(x => x.TotalScore):
  147. </td>
  148. <td>
  149. @Html.TextBoxFor(x => x.TotalScore, new TextBoxOptions { })
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.Content):<div style = "color:Red">(字数需大于100)</div>
  155. </td>
  156. <td colspan="3">
  157. @Html.RichTextFor(x => x.Content, new RichTextOptions { Width = 700, Height = 520 })
  158. @*@Html.TextAreaFor(x => x.Content, new { style = "width: 98%;" })*@
  159. </td>
  160. </tr>
  161. <tr>
  162. <td>
  163. @Html.LabelFor(x => x.Record):<div style = "color:Red">(字数需大于60)</div>
  164. </td>
  165. <td colspan="3">
  166. @Html.RichTextFor(x => x.Record, new RichTextOptions { Width = 700, Height = 520 })
  167. @*@Html.TextAreaFor(x => x.Record, new { style = "width: 98%;" })*@
  168. <div class="sv" style = "display:inline;float:right; line-height:inherit">@(Request["isShow"] == "1" ? new MvcHtmlString("") : Html.Button(new ButtonOptions { OnClick = "LessonRecord_SeletcRecord()", Icon = ButtonIcon.Search, Text = "快速添加" }))</div>
  169. </td>
  170. </tr>
  171. <tr>
  172. <td>
  173. <label>附件:</label>
  174. </td>
  175. <td colspan="3">
  176. @Html.Uploader(new uploaderOption { IsEnabled = (Request["isShow"] != "1"), Name = "LessonRecordAttachment", MainTableID = Model.LessonRecordID })
  177. </td>
  178. </tr>
  179. </table>
  180. </div>
  181. }