Edit.cshtml 31 KB

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