Edit.cshtml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. @model EMIS.ViewModel.SupervisionManage.ProjectRecordView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. ComboGridOptions cgopCollege = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "CollegeID",
  10. Name = "CollegeDropdown",
  11. ID = "CollegeDropdown",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
  17. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/College/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false,
  24. }
  25. };
  26. ComboGridOptions cgopCollegefalse = new ComboGridOptions
  27. {
  28. TextField = "Name",
  29. ValueField = "CollegeID",
  30. OnSelect = "",
  31. Name = "CollegeDropdown",
  32. ID = "CollegeDropdown",
  33. IsEnabled = false,
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
  39. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  40. },
  41. IsCheckOnSelect = true,
  42. DataSourceUrl = Url.Content("~/College/List"),
  43. IsPagination = true,
  44. IsShowRowNumbers = true,
  45. IsSingleSelect = false,
  46. }
  47. };
  48. ComboGridOptions teacher = new ComboGridOptions
  49. {
  50. TextField = "Name",
  51. ValueField = "UserID",
  52. OnSelect = "",
  53. ID = "StaffDropdown",
  54. Name = "StaffDropdown",
  55. GridOptions = new DataGridOptions
  56. {
  57. Columns = new List<DataGridColumn>()
  58. {
  59. //new BoundFieldColumn { FieldName="Code", HeaderText="教室代码", Width=0.1, Align=AlignStyle.Center },
  60. new BoundFieldColumn { FieldName="Name", HeaderText="教师名字", Width=0.1, Align=AlignStyle.Center }
  61. },
  62. IsCheckOnSelect = true,
  63. DataSourceUrl = Url.Content("~/Staff/ListWithNoDataRange"),
  64. IsPagination = true,
  65. IsShowRowNumbers = true,
  66. IsSingleSelect = false,
  67. IsAutoLoad = true
  68. }
  69. };
  70. ComboGridOptions teacherfalse = new ComboGridOptions
  71. {
  72. TextField = "Name",
  73. ValueField = "UserID",
  74. OnSelect = "",
  75. ID = "StaffDropdown",
  76. Name = "StaffDropdown",
  77. IsEnabled = false,
  78. GridOptions = new DataGridOptions
  79. {
  80. Columns = new List<DataGridColumn>()
  81. {
  82. //new BoundFieldColumn { FieldName="Code", HeaderText="教室代码", Width=0.1, Align=AlignStyle.Center },
  83. new BoundFieldColumn { FieldName="Name", HeaderText="教师名字", Width=0.1, Align=AlignStyle.Center }
  84. },
  85. IsCheckOnSelect = true,
  86. DataSourceUrl = Url.Content("~/Staff/List"),
  87. IsPagination = true,
  88. IsShowRowNumbers = true,
  89. IsSingleSelect = false,
  90. IsAutoLoad = true
  91. }
  92. };
  93. ComboGridOptions time = new ComboGridOptions
  94. {
  95. TextField = "Times",
  96. ValueField = "CoursesTimeID",
  97. Name = "TimeComboGrid",
  98. GridOptions = new DataGridOptions
  99. {
  100. Columns = new List<DataGridColumn>()
  101. {
  102. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center }
  103. },
  104. IsCheckOnSelect = true,
  105. DataSourceUrl = Url.Content("~/CoursesTime/List"),
  106. IsPagination = true,
  107. IsShowRowNumbers = true,
  108. IsSingleSelect = false
  109. }
  110. };
  111. ComboGridOptions timefalse = new ComboGridOptions
  112. {
  113. TextField = "Times",
  114. ValueField = "CoursesTimeID",
  115. Name = "TimeComboGrid",
  116. IsEnabled = false,
  117. GridOptions = new DataGridOptions
  118. {
  119. Columns = new List<DataGridColumn>()
  120. {
  121. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center }
  122. },
  123. IsCheckOnSelect = true,
  124. DataSourceUrl = Url.Content("~/CoursesTime/List"),
  125. IsPagination = true,
  126. IsShowRowNumbers = true,
  127. IsSingleSelect = false
  128. }
  129. };
  130. ComboGridOptions course = new ComboGridOptions
  131. {
  132. TextField = "CourseName",
  133. ValueField = "CoursematerialID",
  134. SelectedValue = Model.CoursematerialID,
  135. GridOptions = new DataGridOptions
  136. {
  137. Columns = new List<DataGridColumn>()
  138. {
  139. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.12 },
  140. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 }
  141. },
  142. IsCheckOnSelect = true,
  143. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  144. IsPagination = true,
  145. IsShowRowNumbers = true,
  146. IsSingleSelect = false,
  147. }
  148. };
  149. }
  150. @section scripts{
  151. <script src="~/Scripts/Business/SupervisionManage/ProjectRecordEdit.js" type="text/javascript"></script>
  152. <script type="text/javascript">
  153. var nonSelect = "@DropdownList.SELECT_ALL";
  154. var isUpdate = "@ViewBag.IsUpdate";
  155. var evaluation = "@ViewBag.Evaluation";
  156. </script>
  157. }
  158. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  159. {
  160. <div class="p_title">
  161. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  162. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  163. @(Request["isShow"] == "1" ? new MvcHtmlString("") : Html.ContextMenuBar("Edit"))
  164. </div>
  165. </div>
  166. <div class="search_list">
  167. @Html.HiddenFor(x => x.ProjectRecordID)
  168. @Html.HiddenFor(x => x.IsChangeAttachment)
  169. <table cellpadding="0" cellspacing="0" id="educationMissionClassChecktable">
  170. <tr>
  171. <td>@Html.LabelFor(x => x.SchoolyearID)</td>
  172. <td>@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), SelectedValue = BaseExtensions.GetCurrentSchoolYearID() })</td>
  173. <td>@Html.LabelFor(x => x.SupervisionTypeID):</td>
  174. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.SUP_SupervisionType, x => x.SupervisionTypeID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, OnSelect = "SupervisionTypeSelect" })</td>
  175. </tr>
  176. <tr>
  177. <td>@Html.LabelFor(x => x.SupervisionCollegeID):</td>
  178. <td>@Html.DropdownListFor((x => x.SupervisionCollegeID), new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SupervisionCollege/Dropdown"), SelectedValue = Model.SupervisionCollegeID })</td>
  179. <td>@Html.Label("督导对象"):</td>
  180. <td>@Html.TextBoxFor(x => x.OtherTarget) @Html.ComboGridFor(x => x.UserID, teacher)<div id = "userred" style = "color:Red;display:inline"> *</div></td>
  181. </tr>
  182. <tr>
  183. <td id = "coursetd">@Html.LabelFor(x => x.CoursematerialID):</td>
  184. <td id = "coursetd2">@Html.ComboGridFor(x => x.CoursematerialID, course)<div id = "coursered" style = "color:Red;display:inline"> *</div></td>
  185. <td colspan = "2" id = "coursenull"></td>
  186. <td>@Html.LabelFor(x => x.ProjectDate):</td>
  187. <td>@Html.TextBoxFor(x => x.ProjectDate, new TextBoxOptions { TextBoxType = TextBoxType.Date, OnSelect = "ProjectDateChange" })</td>
  188. </tr>
  189. <tr>
  190. <td>@Html.LabelFor(x => x.Weekday):</td>
  191. <td>@Html.WeekdayDropDownListFor(x => x.Weekday, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect})</td>
  192. <td>@Html.LabelFor(x => x.CoursesTimeID):</td>
  193. <td>@Html.ComboGridFor(x => x.CoursesTimeID, time)</td>
  194. </tr>
  195. <tr>
  196. <td>@Html.LabelFor(x => x.Location):</td>
  197. <td colspan="3">@Html.TextBoxFor(x => x.Location)</td>
  198. </tr>
  199. <tr>
  200. <td>
  201. <label>督导组成员:</label>
  202. </td>
  203. <td colspan="3">
  204. @(Request["isShow"] == "1" ? new MvcHtmlString("") : Html.ContextMenuBar("Edit-Staff"))
  205. @Html.DataGrid(new DataGridOptions
  206. {
  207. Columns = new List<DataGridColumn>()
  208. {
  209. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  210. new LinkButtonColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center , Handle="edit" },
  211. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center },
  212. //new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center },
  213. //new BoundFieldColumn { FieldName="TitleName", HeaderText="职称", Align=AlignStyle.Center },
  214. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  215. new BoundFieldColumn { FieldName="CollegeID", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center ,IsHidden=true },
  216. new BoundFieldColumn { FieldName="DepartmentID", HeaderText="教研室", Align=AlignStyle.Center,IsHidden=true },
  217. new BoundFieldColumn { FieldName="DepartmentName", HeaderText="教研室", Align=AlignStyle.Center },
  218. },
  219. IsCheckOnSelect = true,
  220. DataSourceUrl = Url.Content("~/ProjectRecord/TeacherList?projectRecordID=" + Model.ProjectRecordID),
  221. IsPostBack = true,
  222. ID = "dgTeacherList",
  223. IsPagination = true,
  224. IsShowRowNumbers = true,
  225. IsSingleSelect = false
  226. })
  227. </td>
  228. </tr>
  229. <tr>
  230. <td>@Html.LabelFor(x => x.TotalScore):</td>
  231. <td>@Html.TextBoxFor(x => x.TotalScore)<div id = "totalScorered" style = "color:Red;display:inline"> *</div></td>
  232. <td colspan = "2"></td>
  233. </tr>
  234. <tr>
  235. <td>
  236. <label>@Html.LabelFor(x => x.Content):<div style = "color:Red">(字数需大于100)</div></label>
  237. </td>
  238. <td colspan="3">
  239. @Html.RichTextFor(x => x.Content, new RichTextOptions { Width = 700, Height = 520 })
  240. @*@Html.TextAreaFor(x => x.Content, new { style = "width: 98%;" })*@
  241. </td>
  242. </tr>
  243. <tr>
  244. <td>
  245. @Html.LabelFor(x => x.Advise):<div style = "color:Red">(字数需大于60)</div>
  246. </td>
  247. <td colspan="3">
  248. @Html.RichTextFor(x => x.Advise, new RichTextOptions { Width = 700, Height = 520 })
  249. @*@Html.TextAreaFor(x => x.Advise, new { style = "width: 80%;" })*@
  250. <div class="sv" style = "display:inline;float:right; line-height:inherit">@(Request["isShow"] == "1" ? new MvcHtmlString("") : Html.Button(new ButtonOptions { OnClick = "ProjectRecord_SeletcAdvise()", Icon = ButtonIcon.Search, Text = "快速添加" }))</div>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td>
  255. <label>附件</label>
  256. </td>
  257. <td colspan="3">
  258. @Html.Uploader(new uploaderOption { IsEnabled = (Request["isShow"] != "1"), Name = "ProjectRecordAttachment", MainTableID = Model.ProjectRecordID })
  259. </td>
  260. </tr>
  261. </table>
  262. </div>
  263. }