Edit.cshtml 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. @model EMIS.ViewModel.SelectCourse.ExecutableFreeSelectionCouseView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. //开课教研室
  7. ComboGridOptions cgopDepartment = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "DepartmentID",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. //new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 }
  16. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.3 }
  17. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.3 }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/Department/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false
  24. }
  25. };
  26. //教室信息
  27. ComboGridOptions cgop = new ComboGridOptions
  28. {
  29. TextField = "Name",
  30. ValueField = "ClassroomID",
  31. ID = "ClassroomID",
  32. Name = "ClassroomID",
  33. GridOptions = new DataGridOptions
  34. {
  35. Columns = new List<DataGridColumn>()
  36. {
  37. new LinkButtonColumn { FieldName="Code", HeaderText="教室代码", Align=AlignStyle.Center, Width=0.1 },
  38. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center, Width=0.12 },
  39. new BoundFieldColumn { FieldName="ClassroomTypeName", HeaderText="教室类型", Align=AlignStyle.Center, Width=0.12 },
  40. new BoundFieldColumn { FieldName="Totalseating", HeaderText="总座位数", Align=AlignStyle.Center, Width=0.1 },
  41. },
  42. IsCheckOnSelect = true,
  43. //DataSourceUrl = Url.Content("~/CollegeClassroom/ClassroomListComboGrid?collegeID=" + Model.CollegeID),
  44. DataSourceUrl = Url.Content("~/Classroom/List"),//去除院系条件
  45. //DataSourceUrl = Url.Content("~/ExecutableFreeSelectionCouse/GetCourseProcessClassroomList"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. //课程时间
  52. ComboGridOptions cgopCoursesTime = new ComboGridOptions
  53. {
  54. TextField = "Times",
  55. ValueField = "CoursesTimeID",
  56. GridOptions = new DataGridOptions
  57. {
  58. Columns = new List<DataGridColumn>()
  59. {
  60. new CheckBoxFieldColumn{ HeaderText="", FieldName="CoursesTimeID"},
  61. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center, Width=0.02 },
  62. new BoundFieldColumn { FieldName="TimesSegmentName", HeaderText="时间段", Align=AlignStyle.Center, Width=0.04 },
  63. new BoundFieldColumn { FieldName="StartDate", HeaderText="开始时间", CustomFormatFun="formatStartTime", Align=AlignStyle.Center, Width=0.05 },
  64. new BoundFieldColumn { FieldName="EndDate", HeaderText="结束时间", CustomFormatFun="formatEndTime", Align=AlignStyle.Center, Width=0.05 }
  65. },
  66. IsCheckOnSelect = true,
  67. // DataSourceUrl = Url.Content("~/CollegeClassroom/ClassroomListComboGrid?collegeID=" + Model.CollegeID),
  68. DataSourceUrl = Url.Content("~/CoursesTime/List"),//去除院系条件
  69. IsPagination = true,
  70. IsShowRowNumbers = true,
  71. IsSingleSelect = false
  72. }
  73. };
  74. //授课方式
  75. ListControlOptions lcop = new ListControlOptions
  76. {
  77. Name = "TeachingModeID",
  78. TextField = "Name",
  79. ValueField = "Value",
  80. ColumnCount = 4,
  81. SelectedValueUrl = @Url.Content("~/ExecutableFreeSelectionCouse/TeachingModeType?ExecutableFreeSelectionCouseID=" + Model.ExecutableFreeSelectionCouseID)
  82. };
  83. ////授课地点
  84. //ListControlOptions lcoptp = new ListControlOptions
  85. //{
  86. // ID = "TeachingPlaceID",
  87. // Name = "TeachingPlaceID",
  88. // TextField = "Name",
  89. // ValueField = "Value",
  90. // ColumnCount = 4,
  91. // SelectedValueUrl = @Url.Content("~/ExecutableFreeSelectionCouse/TeachingPlace?ExecutableFreeSelectionCouseID=" + (Model == null ? Guid.Empty : Model.ExecutableFreeSelectionCouseID).ToString())
  92. //};
  93. //年级范围
  94. ListControlOptions lcopGrade = new ListControlOptions
  95. {
  96. Name = "GradeYear",
  97. TextField = "Name",
  98. ValueField = "Value",
  99. ColumnCount = 4,
  100. SelectedValueUrl = @Url.Content("~/ExecutableFreeSelectionCouse/GradeYear?ExecutableFreeSelectionCouseID=" + Model.ExecutableFreeSelectionCouseID)
  101. };
  102. }
  103. @section scripts{
  104. <script src="~/Scripts/Business/SelectCourseManage/ExecutableFreeSelectionCouseEdit.js"
  105. type="text/javascript">
  106. </script>
  107. <script type="text/javascript">
  108. var SelectionCourse = "@EMIS.ViewModel.CF_HandleMode.SelectionCourse";
  109. var TeachingMethod = "@((int)EMIS.ViewModel.EM_TeachingMethod.Lecturer)";
  110. $(function () {
  111. $("#Credit").val(parseFloat($("#Credit").val()).toFixed(1));
  112. $("#TheoryCourse").keyup(function () {
  113. recalculate();
  114. });
  115. $("#Practicehours").keyup(function () {
  116. recalculate();
  117. });
  118. $("#TheoryWeeklyNum").keyup(function () {
  119. recalculate();
  120. });
  121. $("#PracticeWeeklyNum").keyup(function () {
  122. recalculate();
  123. });
  124. //$("#HandleModeID").val("2");
  125. });
  126. function recalculate() {
  127. var theoryCourse = parseInt($("#TheoryCourse").val() == "" ? "0" : $("#TheoryCourse").val());
  128. var practicehours = parseInt($("#Practicehours").val() == "" ? "0" : $("#Practicehours").val());
  129. var theoryWeeklyNum = parseInt($("#TheoryWeeklyNum").val() == "" ? "0" : $("#TheoryWeeklyNum").val());
  130. var practiceWeeklyNum = parseInt($("#PracticeWeeklyNum").val() == "" ? "0" : $("#PracticeWeeklyNum").val());
  131. var totalHours = theoryCourse + practicehours;
  132. var totalWeeklyNum = theoryWeeklyNum + practiceWeeklyNum;
  133. var weeklyHours = totalHours / totalWeeklyNum;
  134. var weeklyNum = weeklyHours / 2;
  135. $("#Totalhours").val(totalHours);
  136. $("#SchoolweeksNum").val(totalWeeklyNum);
  137. $("#WeeklyHours").val(weeklyHours);
  138. $("#WeeklyNum").val(weeklyNum);
  139. }
  140. function calculate() {
  141. var theoryHours = parseFloat($("#TheoryCourse").val());
  142. var practiceHours = parseFloat($("#Practicehours").val());
  143. var trialHours = parseFloat($("#Trialhours").val());
  144. if (isNaN(theoryHours)) theoryHours = 0;
  145. if (isNaN(practiceHours)) practiceHours = 0;
  146. if (isNaN(trialHours)) trialHours = 0;
  147. var totalHours = theoryHours + practiceHours + trialHours;
  148. var timesEachWeek = parseFloat($("#WeeklyNum").val());
  149. if (isNaN(timesEachWeek)) timesEachWeek = totalHours;
  150. var theoryWeekNum = Math.ceil(theoryHours / timesEachWeek);
  151. var practiceWeekNum = Math.ceil(practiceHours / timesEachWeek);
  152. var trialWeekNum = Math.ceil(trialHours / timesEachWeek);
  153. var totalWeekNum = theoryWeekNum + practiceWeekNum + trialWeekNum;
  154. $("#Totalhours").val(totalHours.toString());
  155. $("#TheoryWeeklyNum").val(theoryWeekNum.toString());
  156. $("#PracticeWeeklyNum").val(practiceWeekNum.toString());
  157. $("#TrialWeeklyNum").val(trialWeekNum.toString());
  158. $("#SchoolweeksNum").val(totalWeekNum.toString());
  159. }
  160. function setStartEndWeeklyNum() {
  161. if ($("#StartWeeklyNum").val() != "" && $("#EndWeeklyNum").val() != "")
  162. $("#StartEndWeeklyNum").val($("#StartWeeklyNum").val() + "-" + $("#EndWeeklyNum").val());
  163. DefaultClassNo();
  164. }
  165. //function reload() { }
  166. function selectCoursesTime() {
  167. trigger = $(this);
  168. var dataRowIndex = parseInt(trigger.parents('tr').attr('xRowIndex'));
  169. var dataRow = $("#dgSchedulingList").cmsXDataTable('getRows')[dataRowIndex];
  170. // var ddlClassroomType = trigger.parents('tr').find('[name*=ClassroomTypeID]');
  171. // var weekDay = trigger.parents('tr').find('[name*=Weekday]');
  172. $.popupTopWindow('添加节次', CMS_SystemConfig.VirtualDirectoryPath + '/ExecutableFreeSelectionCouse/CoursesTimeList?' + '&FromMNU=' +
  173. mnu, 560, 480, CoursesTimeSelect_Close, null);
  174. }
  175. function CoursesTimeSelect_Close(coursesTimeList) {
  176. if (!coursesTimeList) return;
  177. if (coursesTimeList.length == 0) return;
  178. trigger.triggerbox("setValue", coursesTimeList);
  179. trigger = null;
  180. }
  181. function selectClassroom() {
  182. if ($("#StartEndWeeklyNum").val() == null || $("#StartEndWeeklyNum").val() == "") {
  183. $.messager.alert('系统信息', '请先填写开始周次和结束周次。');
  184. return;
  185. }
  186. trigger = $(this);
  187. var dataRowIndex = parseInt(trigger.parents('tr').attr('xRowIndex'));
  188. var dataRow = $("#dgSchedulingList").cmsXDataTable('getRows')[dataRowIndex];
  189. var ddlClassroomType = trigger.parents('tr').find('[name*=ClassroomTypeID]');
  190. var weekDay = dataRow.Weekday; //trigger.parents('tr').find('[name*=WeekDay]');
  191. var coursesTimeID = dataRow.CoursesTimeID;
  192. if (ddlClassroomType.val() != '-1') {
  193. $.popupTopWindow('添加教室', CMS_SystemConfig.VirtualDirectoryPath + '/ExecutableFreeSelectionCouse/CourseProcessClassroomList?MaxSelect=1&MinSeatCount='
  194. + '&schedulingWeek=' + $("#StartEndWeeklyNum").val() + "&weekDay=" + weekDay + "&coursesTimeID="
  195. + coursesTimeID + '&ClassroomTypeID=' + ddlClassroomType.val() + '&FromMNU=' +
  196. mnu, 540, 480, ClassroomSelect_Close, null);
  197. } else {
  198. $.popupTopWindow('添加教室', CMS_SystemConfig.VirtualDirectoryPath + '/ExecutableFreeSelectionCouse/CourseProcessClassroomList?MaxSelect=1&MinSeatCount='
  199. + '&schedulingWeek=' + $("#StartEndWeeklyNum").val() + "&weekDay=" + weekDay + "&coursesTimeID="
  200. + coursesTimeID + '&FromMNU=' +
  201. mnu, 540, 480, ClassroomSelect_Close, null);
  202. }
  203. }
  204. function ClassroomSelect_Close(classroomList) {
  205. if (!classroomList) return;
  206. if (classroomList.length == 0) return;
  207. trigger.triggerbox("setValue", classroomList);
  208. trigger = null;
  209. }
  210. function ExecutableFreeSelectionCouse_SchedulingAdd() {
  211. var schedulingViewList = $("#dgSchedulingList").cmsXDataTable("getRows");
  212. schedulingViewList.push({ Weekday: "", CoursesTimeID: "", ClassroomID: "" });
  213. //schedulingViewList.push("");
  214. $("#dgSchedulingList").cmsXDataTable("loadData", { rows: schedulingViewList, total: schedulingViewList.length });
  215. }
  216. function ExecutableFreeSelectionCouse_SchedulingDelete() {
  217. var d = [];
  218. $.each($("#dgSchedulingList").cmsXDataTable("getSelections"), function (index) {
  219. d.push(this);
  220. });
  221. var schedulingViewList = $("#dgSchedulingList").cmsXDataTable("getRows");
  222. var i, j;
  223. var len = schedulingViewList.length;
  224. for (i = len - 1; i >= 0; i--) {
  225. for (j = 0; j < d.length; j++) {
  226. //schedulingViewList.splice(i, 1);
  227. if (schedulingViewList[i].Weekday == d[j].Weekday && schedulingViewList[i].CoursesTimeID == d[j].CoursesTimeID && schedulingViewList[i].ClassroomID == d[j].ClassroomID) {
  228. schedulingViewList.splice(i, 1);
  229. break;
  230. }
  231. }
  232. }
  233. $("#dgSchedulingList").cmsXDataTable("loadData", { rows: schedulingViewList, total: schedulingViewList.length });
  234. }
  235. </script>
  236. }
  237. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  238. @using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "Post", OnSuccess = "VerifySave" }))
  239. {
  240. <div class="p_title">
  241. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  242. 任选设定信息</div>*@
  243. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  244. </div>
  245. <div class="search_list">
  246. @Html.HiddenFor(x => x.ExecutableFreeSelectionCouseID)
  247. @Html.HiddenFor(x => x.CollegeID)
  248. @Html.HiddenFor(x => x.IsNeedVerify)
  249. <table cellpadding="0" cellspacing="0" id="executableFreeSelectionCouseTable">
  250. <tr>
  251. <td>
  252. @Html.LabelFor(x => x.DefaultClassName):
  253. </td>
  254. <td colspan="3">
  255. @Html.TextBoxFor(x => x.DefaultClassName, new Dictionary<string, object> { { "style", "width:85%;" } })
  256. </td>
  257. </tr>
  258. <tr>
  259. <td>
  260. @Html.LabelFor(x => x.SchoolyearCode):
  261. </td>
  262. <td>
  263. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  264. {
  265. BindType = DropdownListBindType.PleaseSelect,
  266. TextField = "Text",
  267. ValueField = "Value",
  268. ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"),
  269. SelectedValue = BaseExtensions.GetCurrentSchoolYearID()
  270. })
  271. </td>
  272. <td>
  273. @Html.LabelFor(x => x.CourseName):
  274. </td>
  275. <td>
  276. @Html.ComboGridFor(x => x.FreeSelectionCouseID, new ComboGridOptions
  277. {
  278. TextField = "CourseName",
  279. ValueField = "FreeSelectionCouseID",
  280. OnSelect = "reload",
  281. GridOptions = new DataGridOptions
  282. {
  283. Columns = new List<DataGridColumn>()
  284. {
  285. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  286. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.25 },
  287. new BoundFieldColumn { FieldName="DepartmentName", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.25 }
  288. },
  289. IsCheckOnSelect = true,
  290. DataSourceUrl = Url.Content("~/FreeSelectionCourse/List"),
  291. IsPagination = true,
  292. IsShowRowNumbers = true,
  293. IsSingleSelect = false
  294. }
  295. })
  296. </td>
  297. </tr>
  298. <tr>
  299. <td>
  300. @Html.LabelFor(x => x.CourseTypeID):
  301. </td>
  302. <td>
  303. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)
  304. </td>
  305. <td>
  306. @Html.LabelFor(x => x.DepartmentName):
  307. </td>
  308. <td>
  309. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  310. </td>
  311. </tr>
  312. <tr>
  313. <td>
  314. @Html.LabelFor(x => x.CourseStructureID):
  315. </td>
  316. <td>
  317. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseStructure, x => x.CourseStructureID)
  318. </td>
  319. <td>
  320. @Html.LabelFor(x => x.CourseCategoryID):
  321. </td>
  322. <td>
  323. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseCategory, x => x.CourseCategoryID)
  324. </td>
  325. </tr>
  326. <tr>
  327. <td>
  328. @Html.LabelFor(x => x.CourseQualityID):
  329. </td>
  330. <td>
  331. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseQuality, x => x.CourseQualityID)
  332. </td>
  333. <td>
  334. @Html.LabelFor(x => x.TeachinglanguageID):
  335. </td>
  336. <td>
  337. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Teachinglanguage, x => x.TeachinglanguageID)
  338. </td>
  339. </tr>
  340. <tr>
  341. <td>
  342. @Html.LabelFor(x => x.ExaminationModeID):
  343. </td>
  344. <td>
  345. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, x => x.ExaminationModeID)
  346. </td>
  347. <td>@Html.LabelFor(x=>x.ResultTypeID)
  348. </td>
  349. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID))
  350. </td>
  351. </tr>
  352. @*<tr>
  353. <td>@Html.LabelFor(x => x.SchoolyearNumID):
  354. </td>
  355. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, x => x.SchoolyearNumID, null, new Dictionary<string, string> { { "disabled", "disabled" } })
  356. </td>
  357. <td>@Html.LabelFor(x => x.SchoolcodeID):
  358. </td>
  359. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Semester, x => x.SchoolcodeID, null, new Dictionary<string, string> { { "disabled", "disabled" } })
  360. </td>
  361. </tr>*@
  362. <tr>
  363. <td>
  364. @Html.LabelFor(x => x.PracticeTypeID):
  365. </td>
  366. <td>
  367. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_PracticeType, x => x.PracticeTypeID)
  368. </td>
  369. <td>
  370. @Html.LabelFor(x => x.IsNeedMaterial):
  371. </td>
  372. <td>
  373. @Html.CheckBoxFor(x => x.IsNeedMaterial)
  374. </td>
  375. </tr>
  376. <tr>
  377. <td>
  378. @Html.LabelFor(x => x.HandleModeID):
  379. </td>
  380. <td>
  381. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HandleMode, (x => x.HandleModeID))
  382. </td>
  383. <td>
  384. @Html.LabelFor(x => x.PeopleNumlower):
  385. </td>
  386. <td>
  387. @Html.TextBoxFor(x => x.PeopleNumlower)
  388. </td>
  389. </tr>
  390. <tr>
  391. <td>
  392. @Html.LabelFor(x => x.Credit):
  393. </td>
  394. <td>
  395. @Html.TextBoxFor(x => x.Credit)
  396. </td>
  397. <td>
  398. @Html.LabelFor(x => x.PeopleNumlimit):
  399. </td>
  400. <td>
  401. @Html.TextBoxFor(x => x.PeopleNumlimit)
  402. </td>
  403. </tr>
  404. <tr>
  405. <td>
  406. @Html.LabelFor(x => x.TheoryCourse):
  407. </td>
  408. <td>
  409. @Html.TextBoxFor(x => x.TheoryCourse, new { onchange = "recalculate();" })
  410. </td>
  411. <td>
  412. @Html.LabelFor(x => x.Practicehours):
  413. </td>
  414. <td>
  415. @Html.TextBoxFor(x => x.Practicehours, new { onchange = "recalculate();" })
  416. </td>
  417. </tr>
  418. <tr>
  419. <td>
  420. @Html.LabelFor(x => x.Trialhours):
  421. </td>
  422. <td>
  423. @Html.TextBoxFor(x => x.Trialhours, new { onchange = "recalculate();" })
  424. </td>
  425. <td>
  426. @Html.LabelFor(x => x.Totalhours):
  427. </td>
  428. <td>
  429. @Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
  430. </td>
  431. </tr>
  432. <tr>
  433. <td colspan="4">
  434. <div id="weekExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  435. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0;"
  436. onclick="swapWeekSettings();">
  437. </div>
  438. <div style="float: left; cursor: pointer; color: red;" onclick="swapWeekSettings();">
  439. 上课周次信息
  440. </div>
  441. </td>
  442. </tr>
  443. <tr style="display: ">
  444. <td>@Html.LabelFor(x => x.TheoryWeeklyNum):
  445. </td>
  446. <td>@Html.TextBoxFor(x => x.TheoryWeeklyNum)
  447. </td>
  448. <td>@Html.LabelFor(x => x.PracticeWeeklyNum):
  449. </td>
  450. <td>@Html.TextBoxFor(x => x.PracticeWeeklyNum)
  451. </td>
  452. </tr>
  453. <tr style="display: ">
  454. <td>@Html.LabelFor(x => x.TrialWeeklyNum):
  455. </td>
  456. <td>@Html.TextBoxFor(x => x.TrialWeeklyNum)
  457. </td>
  458. <td>@Html.LabelFor(x => x.SchoolweeksNum):
  459. </td>
  460. <td>@Html.TextBoxFor(x => x.SchoolweeksNum, new TextBoxOptions { IsEnabled = false })
  461. </td>
  462. </tr>
  463. <tr style="display: ">
  464. <td>@Html.LabelFor(x => x.StartWeeklyNum):
  465. </td>
  466. <td>@Html.TextBoxFor(x => x.StartWeeklyNum, new { onchange = "setStartEndWeeklyNum();" })
  467. </td>
  468. <td>@Html.LabelFor(x => x.EndWeeklyNum):
  469. </td>
  470. <td>@Html.TextBoxFor(x => x.EndWeeklyNum, new { onchange = "setStartEndWeeklyNum();" })
  471. </td>
  472. </tr>
  473. <tr style="display: ">
  474. <td>@Html.LabelFor(x => x.WeeklyHours):
  475. </td>
  476. <td>@Html.TextBoxFor(x => x.WeeklyHours)
  477. </td>
  478. <td>@Html.LabelFor(x => x.WeeklyNum):
  479. </td>
  480. <td>@Html.TextBoxFor(x => x.WeeklyNum)
  481. </td>
  482. </tr>
  483. @*<tr>
  484. <td>
  485. @Html.LabelFor(x => x.Weekday):
  486. </td>
  487. <td>
  488. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.ES_WeekDay, (x => x.Weekday))
  489. </td>
  490. <td>
  491. @Html.LabelFor(x => x.CoursesTimeID):
  492. </td>
  493. <td>
  494. @Html.ComboGridFor(x => x.CoursesTimeID, cgopCoursesTime)
  495. </td>
  496. </tr> *@
  497. <tr>
  498. <td>
  499. @Html.LabelFor(x => x.StartEndWeeklyNum):
  500. </td>
  501. <td>
  502. @Html.TextBoxFor(x => x.StartEndWeeklyNum, new TextBoxOptions { IsEnabled = false })
  503. </td>
  504. <td>
  505. @Html.LabelFor(x => x.ClassroomName):
  506. </td>
  507. <td>
  508. @Html.ComboGridFor(x => x.ClassroomID, cgop)
  509. </td>
  510. </tr>
  511. <tr>
  512. <td>
  513. @Html.LabelFor(x => x.Scheduling):
  514. </td>
  515. <td colspan="3">
  516. @Html.ContextMenuBar("Edit-SchedulingGrid")
  517. @Html.DataGrid(new DataGridOptions
  518. {
  519. Columns = new List<DataGridColumn>()
  520. {
  521. new CheckBoxFieldColumn { HeaderText="", FieldName="ExecutableFreeSelectionCouseSchedulingID" },
  522. new DictionaryDropdownListColumn { HeaderText="授课星期", FieldName="Weekday", DictionaryType=EMIS.ViewModel.DictionaryItem.ES_WeekDay, Align=AlignStyle.Center, Width=80 },
  523. new TriggerBoxColumn { HeaderText="节次", FieldName="CoursesTimeID", TextFieldName="Times", TargetTextFieldName="Times", TargetFieldName="CoursesTimeID", TriggerHandle="selectCoursesTime", Align=AlignStyle.Center, Width=80 },
  524. //new DictionaryDropdownListColumn { HeaderText="教室类型", FieldName="ClassroomTypeID", DictionaryType=EMIS.ViewModel.DictionaryItem.CF_ClassroomType , Align=AlignStyle.Center, Width=80 },
  525. //new TriggerBoxColumn { HeaderText="教室", FieldName="ClassroomID", TextFieldName="ClassroomName", TargetTextFieldName="Name", TargetFieldName="ClassroomID", TriggerHandle="selectClassroom", Align=AlignStyle.Center, Width=80 }
  526. },
  527. PageSize = 5,
  528. IsPostBack = true,
  529. IsCheckOnSelect = true,
  530. DataSourceUrl = Url.Content("~/ExecutableFreeSelectionCouse/GetSchedulingViewList?ExecutableFreeSelectionCouseID=" + Model.ExecutableFreeSelectionCouseID),
  531. ID = "dgSchedulingList",
  532. //OnLoadSuccessFun = "SetTotalView",
  533. IsPagination = true,
  534. IsShowRowNumbers = true,
  535. IsSingleSelect = false,
  536. MaxHeight = 120
  537. })
  538. </td>
  539. </tr>
  540. <tr>
  541. <td>
  542. @Html.LabelFor(x => x.GradeYear):
  543. </td>
  544. <td colspan="3">
  545. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_SchoolyearNum, lcopGrade)
  546. </td>
  547. </tr>
  548. <tr>
  549. <td>
  550. @Html.LabelFor(x => x.SpecialtyID):
  551. </td>
  552. <td colspan="3">
  553. @Html.ContextMenuBar("Edit-SpecialtyGrid")
  554. @Html.DataGrid(new DataGridOptions
  555. {
  556. Columns = new List<DataGridColumn>()
  557. {
  558. new CheckBoxFieldColumn{ HeaderText="", FieldName="SpecialtyID" },
  559. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.04 },
  560. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.1 },
  561. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.03 },
  562. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.04 },
  563. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.04 }
  564. //new BoundFieldColumn { FieldName="ScienceclassName", HeaderText="专业科类", Align=AlignStyle.Center, Width=0.04 },
  565. //new BoundFieldColumn { FieldName="PropertyName", HeaderText="专业属性", Align=AlignStyle.Center, Width=0.04 },
  566. //new BoundFieldColumn { FieldName="StandardTitleName", HeaderText="专业称号", Align=AlignStyle.Center, Width=0.04 },
  567. //new BoundFieldColumn { FieldName="StandardLevelName", HeaderText="称号级别", Align=AlignStyle.Center, Width=0.04 }
  568. },
  569. PageSize = 20,
  570. IsCheckOnSelect = true,
  571. DataSourceUrl = Url.Content("~/ExecutableFreeSelectionCouse/SpecialtyList?ExecutableFreeSelectionCouseID=" + Request["ExecutableFreeSelectionCouseID"]),
  572. IsPostBack = true,
  573. ID = "dgSpecialtyList",
  574. IsPagination = true,
  575. IsShowRowNumbers = true,
  576. IsSingleSelect = false
  577. })
  578. </td>
  579. </tr>
  580. <tr>
  581. <td>@Html.LabelFor(x => x.Teachers):
  582. </td>
  583. <td colspan="3">@Html.ContextMenuBar("Edit-TeacherGrid")
  584. @Html.DataGrid(new DataGridOptions
  585. {
  586. Columns = new List<DataGridColumn>()
  587. {
  588. new CheckBoxFieldColumn { FieldName="UserID" },
  589. new BoundFieldColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.04 },
  590. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  591. new DictionaryDropdownListColumn { FieldName="TeachingMethod", HeaderText="任课方式", Align=AlignStyle.Center, Width=0.04,
  592. DictionaryType = EMIS.ViewModel.DictionaryItem.EM_TeachingMethod }
  593. },
  594. PageSize = 3,
  595. IsCheckOnSelect = true,
  596. DataSourceUrl = Url.Content("~/ExecutableFreeSelectionCouse/TeacherList?ExecutableFreeSelectionCouseID=" + Request["ExecutableFreeSelectionCouseID"]),
  597. IsPostBack = true,
  598. ID = "dgTeacherList",
  599. IsPagination = true,
  600. IsShowRowNumbers = true,
  601. IsSingleSelect = false,
  602. MaxHeight = 65
  603. })
  604. </td>
  605. </tr>
  606. @*<tr>
  607. <td>@Html.LabelFor(x => x.TeachingPlaceID):
  608. </td>
  609. <td colspan="3">@Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.EM_TeachingPlace, lcoptp)
  610. </td>
  611. </tr>*@
  612. <tr>
  613. <td>
  614. @Html.LabelFor(x => x.TeachingModeID):
  615. </td>
  616. <td colspan="3">
  617. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, lcop)
  618. </td>
  619. </tr>
  620. <tr>
  621. <td>
  622. @Html.LabelFor(x => x.Remarks):
  623. </td>
  624. <td colspan="3">
  625. @Html.TextAreaFor(x => x.Remarks, new Dictionary<string, object> { { "style", "width:85%;" } })
  626. </td>
  627. </tr>
  628. </table>
  629. </div>
  630. }
  631. </div>