ExecutableFreeSelectionCouseController.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using EMIS.CommonLogic.SelectCourse;
  7. using EMIS.ViewModel;
  8. using EMIS.Web.Controls;
  9. using Bowin.Common.Data;
  10. using Bowin.Web.Controls.Mvc;
  11. using Bowin.Common.Mapping;
  12. using EMIS.ViewModel.SelectCourse;
  13. using EMIS.Utility.FormValidate;
  14. using Bowin.Common.Exceptions;
  15. using Bowin.Common.Utility;
  16. using Bowin.Common.Linq.Entity;
  17. using Bowin.Common.JSON;
  18. using EMIS.Utility;
  19. using EMIS.ViewModel.EnrollManage.SpecialtyManage;
  20. using EMIS.ViewModel.EducationManage;
  21. namespace EMIS.Web.Controllers.SelectCourseManage
  22. {
  23. [Authorization]
  24. public class ExecutableFreeSelectionCouseController : Controller
  25. {
  26. public IFreeSelectionCourseServices FreeSelectionCourseServices { get; set; }
  27. public IExecutableFreeSelectionCouseServices ExecutableFreeSelectionCouseServices { get; set; }
  28. public IFreeSelectionCourseApplyServices FreeSelectionCourseApplyServices { get; set; }
  29. /// <summary>
  30. /// 任选设定页面
  31. /// </summary>
  32. /// <returns></returns>
  33. public ActionResult List()
  34. {
  35. return View();
  36. }
  37. /// <summary>
  38. /// 查询列表
  39. /// </summary>
  40. /// <param name="pararms"></param>
  41. /// <returns></returns>
  42. [HttpPost]
  43. public ActionResult List(QueryParamsModel pararms)
  44. {
  45. ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
  46. var campusID = pararms.getExtraGuid("CampusDropdown");
  47. var collegeID = pararms.getExtraGuid("CollegeDropdown");
  48. var departmentID = pararms.getExtraGuid("DepartmentDropdown");
  49. var schoolyear = pararms.getExtraGuid("SchoolYearDropdown").ToString() == DropdownList.SELECT_ALL.ToString() ? null : pararms.getExtraGuid("SchoolYearDropdown");
  50. //var schoolyearNum = pararms.getExtraInt("DictionarySchoolyearNum").ToString() == DropdownList.SELECT_ALL.ToString() ? null : pararms.getExtraInt("DictionarySchoolyearNum");
  51. //var schoolcode = pararms.getExtraInt("DictionarySchoolcode").ToString() == DropdownList.SELECT_ALL.ToString() ? null : pararms.getExtraInt("DictionarySchoolcode");
  52. var isOpen = pararms.getExtraInt("DictionaryIsOpen") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryIsOpen");
  53. var Status = pararms.getExtraInt("DictionaryStatus") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryStatus");
  54. return this.Json(ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseViewGrid(configuretView,
  55. schoolyear, campusID, collegeID, departmentID, Status, isOpen, (int)pararms.page, (int)pararms.rows));
  56. }
  57. /// <summary>
  58. /// 复制新增
  59. /// </summary>
  60. /// <param name="specialtyCourseID"></param>
  61. /// <returns></returns>
  62. public ActionResult CopyAdd(Guid sourceExecutableFreeSelectionCouseID)
  63. {
  64. ExecutableFreeSelectionCouseView executableFreeSelectionCouseView = new ExecutableFreeSelectionCouseView();
  65. executableFreeSelectionCouseView = ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseView(sourceExecutableFreeSelectionCouseID);
  66. return View("Edit", executableFreeSelectionCouseView);
  67. }
  68. /// <summary>
  69. /// 复制新增
  70. /// </summary>
  71. /// <param name="ExecutableFreeSelectionCouse"></param>
  72. /// <returns></returns>
  73. [HttpPost]
  74. public ActionResult CopyAdd(ExecutableFreeSelectionCouseView ExecutableFreeSelectionCouse)
  75. {
  76. ExecutableFreeSelectionCouse.ExecutableFreeSelectionCouseID = Guid.Empty;
  77. return this.Edit(ExecutableFreeSelectionCouse);
  78. }
  79. /// <summary>
  80. /// 编辑
  81. /// </summary>
  82. /// <param name="ExecutableFreeSelectionCouseID"></param>
  83. /// <returns></returns>
  84. public ActionResult Edit(Guid? ExecutableFreeSelectionCouseID)
  85. {
  86. ExecutableFreeSelectionCouseView executableFreeSelectionCouseView = new ExecutableFreeSelectionCouseView();
  87. executableFreeSelectionCouseView.HandleModeID = (int)EMIS.ViewModel.CF_HandleMode.SelectionCourse;
  88. executableFreeSelectionCouseView.DepartmentID = CustomPrincipal.Current.DepartmentID;
  89. if (ExecutableFreeSelectionCouseID.HasValue)
  90. executableFreeSelectionCouseView = ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseView(ExecutableFreeSelectionCouseID);
  91. else
  92. {
  93. var staff = FreeSelectionCourseApplyServices.GetStaff(CustomPrincipal.Current.UserID);
  94. if (staff != null)
  95. {
  96. executableFreeSelectionCouseView.DepartmentID = staff.DepartmentID;
  97. ViewBag.DepartmentID = staff.DepartmentID;
  98. }
  99. }
  100. return View(executableFreeSelectionCouseView);
  101. }
  102. /// <summary>
  103. /// 编辑
  104. /// </summary>
  105. /// <param name="ExecutableFreeSelectionCouse"></param>
  106. /// <returns></returns>
  107. [HttpPost]
  108. public ActionResult Edit(ExecutableFreeSelectionCouseView ExecutableFreeSelectionCouse)
  109. {
  110. int? type = 0;
  111. try
  112. {
  113. var teacherList = DataGrid.GetTableData<ExecutableFreeSelectionCouseTeacherListView>("dgTeacherList");
  114. var specialtyList = DataGrid.GetTableData<ExecutableFreeSelectionCouseSpecialtyListView>("dgSpecialtyList");
  115. var schedulingList = DataGrid.GetTableData<ExecutableFreeSelectionCouseSchedulingView>("dgSchedulingList");
  116. if (ExecutableFreeSelectionCouse.ExecutableFreeSelectionCouseID == null || ExecutableFreeSelectionCouse.ExecutableFreeSelectionCouseID == Guid.Empty)
  117. {
  118. ExecutableFreeSelectionCouseServices.ExecutableFreeSelectionCouseAdd(ExecutableFreeSelectionCouse, teacherList, specialtyList, schedulingList, out type);
  119. }
  120. else
  121. {
  122. ExecutableFreeSelectionCouseServices.ExecutableFreeSelectionCouseUpdate(ExecutableFreeSelectionCouse, teacherList, specialtyList, schedulingList, out type);
  123. }
  124. return Json(new ReturnMessage()
  125. {
  126. IsSuccess = true,
  127. Message = "保存成功!"
  128. });
  129. }
  130. catch (Exception ex)
  131. { //如果验证到排课冲突type返回1,页面js根据type弹出选择框,用户可选择继续保存或不保存,如果不返回1,弹出一般的错误提示框
  132. if (type == 1)
  133. {
  134. return Json(new ReturnMessage()
  135. {
  136. Type = 1,
  137. IsSuccess = false,
  138. Message = "保存失败:" + ex.Message,
  139. });
  140. }
  141. else
  142. return Json(new ReturnMessage()
  143. {
  144. IsSuccess = false,
  145. Type = 2,
  146. Message = "保存失败:" + ex.Message,
  147. });
  148. }
  149. }
  150. /// <summary>
  151. /// 明细页面
  152. /// </summary>
  153. /// <param name="ExecutableFreeSelectionCouseID"></param>
  154. /// <returns></returns>
  155. public ActionResult Details(Guid? ExecutableFreeSelectionCouseID)
  156. {
  157. ExecutableFreeSelectionCouseView freeSelectCourseApplyView = new ExecutableFreeSelectionCouseView();
  158. if (ExecutableFreeSelectionCouseID.HasValue)
  159. freeSelectCourseApplyView = ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseView(ExecutableFreeSelectionCouseID);
  160. return View(freeSelectCourseApplyView);
  161. }
  162. public ActionResult TeacherEdit(Guid ExecutableFreeSelectionCouseID)
  163. {
  164. return View();
  165. }
  166. /// <summary>
  167. /// 开放
  168. /// </summary>
  169. /// <param name="ExecutableFreeSelectionCouseIDs"></param>
  170. /// <returns></returns>
  171. [HttpPost]
  172. public ActionResult Open(string ExecutableFreeSelectionCouseIDs)
  173. {
  174. try
  175. {
  176. List<Guid?> list = new List<Guid?>();
  177. for (int i = 0; i < ExecutableFreeSelectionCouseIDs.Split(',').Length; i++)
  178. {
  179. string id = ExecutableFreeSelectionCouseIDs.Split(',')[i];
  180. if (!string.IsNullOrEmpty(id))
  181. {
  182. Guid ExecutableFreeSelectionCouseID = new Guid(id);
  183. list.Add(ExecutableFreeSelectionCouseID);
  184. }
  185. }
  186. ExecutableFreeSelectionCouseServices.ExecutableFreeSelectionCouseOpen(list);
  187. return Json(new ReturnMessage()
  188. {
  189. IsSuccess = true,
  190. Message = "开放成功。"
  191. });
  192. }
  193. catch (Exception ex)
  194. {
  195. return Json(new ReturnMessage()
  196. {
  197. IsSuccess = false,
  198. Message = "开放失败,原因:" + ex.Message
  199. });
  200. }
  201. }
  202. /// <summary>
  203. /// 取消
  204. /// </summary>
  205. /// <param name="ExecutableFreeSelectionCouseIDs"></param>
  206. /// <returns></returns>
  207. [HttpPost]
  208. public ActionResult Cancel(string ExecutableFreeSelectionCouseIDs)
  209. {
  210. try
  211. {
  212. List<Guid?> list = new List<Guid?>();
  213. for (int i = 0; i < ExecutableFreeSelectionCouseIDs.Split(',').Length; i++)
  214. {
  215. string id = ExecutableFreeSelectionCouseIDs.Split(',')[i];
  216. if (!string.IsNullOrEmpty(id))
  217. {
  218. Guid ExecutableFreeSelectionCouseID = new Guid(id);
  219. list.Add(ExecutableFreeSelectionCouseID);
  220. }
  221. }
  222. ExecutableFreeSelectionCouseServices.ExecutableFreeSelectionCouseCancel(list);
  223. return Json(new ReturnMessage()
  224. {
  225. IsSuccess = true,
  226. Message = "取消成功。"
  227. });
  228. }
  229. catch (Exception ex)
  230. {
  231. return Json(new ReturnMessage()
  232. {
  233. IsSuccess = false,
  234. Message = "取消失败,原因:" + ex.Message
  235. });
  236. }
  237. }
  238. /// <summary>
  239. /// 删除
  240. /// </summary>
  241. /// <param name="ExecutableFreeSelectionCouseIDs"></param>
  242. /// <returns></returns>
  243. [HttpPost]
  244. public ActionResult Delete(string ExecutableFreeSelectionCouseIDs)
  245. {
  246. try
  247. {
  248. List<Guid?> list = new List<Guid?>();
  249. for (int i = 0; i < ExecutableFreeSelectionCouseIDs.Split(',').Length; i++)
  250. {
  251. string id = ExecutableFreeSelectionCouseIDs.Split(',')[i];
  252. if (!string.IsNullOrEmpty(id))
  253. {
  254. Guid ExecutableFreeSelectionCouseID = new Guid(id);
  255. list.Add(ExecutableFreeSelectionCouseID);
  256. }
  257. }
  258. ExecutableFreeSelectionCouseServices.ExecutableFreeSelectionCouseDelete(list);
  259. return Json(new ReturnMessage()
  260. {
  261. IsSuccess = true,
  262. Message = "删除成功!"
  263. });
  264. }
  265. catch (Exception ex)
  266. {
  267. return Json(new ReturnMessage()
  268. {
  269. IsSuccess = false,
  270. Message = "删除失败,原因:" + ex.Message
  271. });
  272. }
  273. }
  274. /// <summary>
  275. /// 提交
  276. /// </summary>
  277. /// <param name="executableFreeSelectionCouseIDs"></param>
  278. /// <returns></returns>
  279. [HttpPost]
  280. public ActionResult Submit(string executableFreeSelectionCouseIDs)
  281. {
  282. try
  283. {
  284. List<Guid> list = new List<Guid>();
  285. for (int i = 0; i < executableFreeSelectionCouseIDs.Split(',').Length; i++)
  286. {
  287. if (!string.IsNullOrEmpty(executableFreeSelectionCouseIDs.Split(',')[i]))
  288. {
  289. Guid ID = new Guid(executableFreeSelectionCouseIDs.Split(',')[i]);
  290. list.Add(ID);
  291. }
  292. }
  293. ExecutableFreeSelectionCouseServices.ExecutableFreeSelectionCouseSubmit(list);
  294. return Json(new ReturnMessage()
  295. {
  296. IsSuccess = true,
  297. Message = "提交成功!"
  298. });
  299. }
  300. catch (Exception ex)
  301. {
  302. return Json(new ReturnMessage()
  303. {
  304. IsSuccess = false,
  305. Message = "提交失败,原因:" + ex.Message
  306. });
  307. }
  308. }
  309. /// <summary>
  310. /// 导出Excel
  311. /// </summary>
  312. /// <returns></returns>
  313. [HttpPost]
  314. public ActionResult Excel()
  315. {
  316. NpoiExcelHelper neh = new NpoiExcelHelper();
  317. ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
  318. var campusID = Request.Form["CampusDropdown"].ParseStrTo<Guid>();
  319. var collegeID = Request.Form["CollegeDropdown"].ParseStrTo<Guid>();
  320. var departmentID = Request.Form["DepartmentDropdown"].ParseStrTo<Guid>();
  321. var schoolyear = Request.Form["SchoolyearDropdown"] == DropdownList.SELECT_ALL.ToString() ? null : Request.Form["SchoolyearDropdown"].ParseStrTo<Guid>();
  322. //var schoolyearNum = Request.Form["DictionarySchoolyearNum"].ToString() == DropdownList.SELECT_ALL.ToString() ? null : Request.Form["DictionarySchoolyearNum"];
  323. //var schoolcode = Request.Form["DictionarySchoolcode"].ToString() == DropdownList.SELECT_ALL.ToString() ? null : Request.Form["DictionarySchoolcode"];
  324. var isOpen = Request.Form["DictionaryIsOpen"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryIsOpen"].ParseStrTo<int>();
  325. var Status = Request.Form["DictionaryStatus"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryStatus"].ParseStrTo<int>();
  326. var dt = ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseViewList(configuretView, schoolyear, campusID, collegeID, departmentID, Status, isOpen).Select(x => new
  327. {
  328. //x.FreeSelectionCouseNo,
  329. x.SchoolyearName,
  330. x.DepartmentName,
  331. //x.CollegeName,
  332. x.DefaultClassName,
  333. x.WeekdayTimesSegmentName,
  334. //x.CourseCode,
  335. //x.CourseName,
  336. //x.CourseCategoryName,
  337. //x.CourseTypeName,
  338. //x.CourseQualityName,
  339. //x.Credit,
  340. //x.Totalhours,
  341. //x.SchoolweeksNum,
  342. //x.SchoolyearNumName,
  343. //x.SchoolcodeName,
  344. //x.StarttermName,
  345. x.TeacherNames,
  346. x.PeopleNumlower,
  347. x.PeopleNumlimit,
  348. x.CourseTypeName,
  349. x.IsNeedMaterialName,
  350. x.ApprovalStatusName
  351. }).ToTable();
  352. string[] liststring = { //"选课编号",
  353. "学年学期", "教研室", //RSL.Get("College"),
  354. "选修任务班名称",
  355. //"课程代码",
  356. //"课程名称", "课程属性", "课程类型", "课程性质", "学分","总学时",
  357. //"上课周数", "学年数", "学期", "开课学期"
  358. "上课时间",
  359. "授课教师","人数下限","人数上限","选修类型","是否需要教材","审批状态"};
  360. neh.Export(dt, liststring, "计划申请信息");
  361. return RedirectToAction("MsgShow", "Common", new
  362. {
  363. msg = "导出成功!",
  364. url = Url.Content("~/ExecutableFreeSelectionCouse/List").AddMenuParameter()
  365. });
  366. }
  367. public ActionResult GetFreeSelectionCourseView(Guid? freeSelectionCourseID)
  368. {
  369. FreeSelectionCourseView freeSelectionCourseView = new FreeSelectionCourseView();
  370. if (freeSelectionCourseID.HasValue)
  371. freeSelectionCourseView = FreeSelectionCourseServices.GetFreeSelectionCourseView(freeSelectionCourseID);
  372. return base.Json(freeSelectionCourseView);
  373. }
  374. /// <summary>
  375. /// 获取任选课程已经存在在授课方式
  376. /// </summary>
  377. /// <param name="freeSelectionCourseID"></param>
  378. /// <returns></returns>
  379. [HttpPost]
  380. public ActionResult TeachingModeType(Guid? ExecutableFreeSelectionCouseID)
  381. {
  382. List<int> list = new List<int>();
  383. if (ExecutableFreeSelectionCouseID.HasValue && ExecutableFreeSelectionCouseID != Guid.Empty)
  384. list = ExecutableFreeSelectionCouseServices.GetCourseTeachingModeType(ExecutableFreeSelectionCouseID);
  385. else
  386. list.Add(((int)EMIS.ViewModel.CF_TeachingMode.Theory));
  387. return base.Json(list.ConvertAll(x => x.ToString()));
  388. }
  389. /// <summary>
  390. /// 获取任选课程申请已经存在在授课方式
  391. /// </summary>
  392. /// <param name="freeSelectionCourseID"></param>
  393. /// <returns></returns>
  394. [HttpPost]
  395. public ActionResult CourseApplyTeachingModeType(Guid? freeSelectionCourseID)
  396. {
  397. List<int> list = new List<int>();
  398. if (freeSelectionCourseID.HasValue && freeSelectionCourseID != Guid.Empty)
  399. list = ExecutableFreeSelectionCouseServices.GetCourseTeachingModeType(freeSelectionCourseID);
  400. else
  401. list.Add(((int)EMIS.ViewModel.CF_TeachingMode.Theory));
  402. return base.Json(list.ConvertAll(x => x.ToString()));
  403. }
  404. [HttpPost]
  405. public ActionResult GradeYear(Guid? ExecutableFreeSelectionCouseID)
  406. {
  407. List<int> list = new List<int>();
  408. if (ExecutableFreeSelectionCouseID.HasValue && ExecutableFreeSelectionCouseID != Guid.Empty)
  409. list = ExecutableFreeSelectionCouseServices.GetCourseGradeYear(ExecutableFreeSelectionCouseID);
  410. return base.Json(list.ConvertAll(x => x.ToString()));
  411. }
  412. /// <summary>
  413. /// 列表查询
  414. /// </summary>
  415. /// <param name="pararms"></param>
  416. /// <returns></returns>
  417. [HttpPost]
  418. public ActionResult SpecialtyList(Guid ExecutableFreeSelectionCouseID)
  419. {
  420. var specialtyList = this.ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseSpecialtyListView(ExecutableFreeSelectionCouseID);
  421. return base.Json(new GridResultSet<SpecialtyView>() { rows = specialtyList, total = specialtyList.Count });
  422. }
  423. /// <summary>
  424. /// 列表查询
  425. /// </summary>
  426. /// <param name="pararms"></param>
  427. /// <returns></returns>
  428. [HttpPost]
  429. public ActionResult TeacherList(Guid ExecutableFreeSelectionCouseID)
  430. {
  431. var teacherList = this.ExecutableFreeSelectionCouseServices.GetExecutableFreeSelectionCouseTeacherListView(ExecutableFreeSelectionCouseID);
  432. return base.Json(new GridResultSet<ExecutableFreeSelectionCouseTeacherListView>() { rows = teacherList, total = teacherList.Count });
  433. }
  434. [HttpPost]
  435. public ActionResult TeacherEdit(Guid ExecutableFreeSelectionCouseID, string addTeacherListJson)
  436. {
  437. try
  438. {
  439. var addTeacherList = addTeacherListJson.JsonToObject<List<ExecutableFreeSelectionCouseTeacherListView>>();
  440. ExecutableFreeSelectionCouseServices.SaveTeachers(ExecutableFreeSelectionCouseID, addTeacherList);
  441. return Json(new ReturnMessage { IsSuccess = true });
  442. }
  443. catch (Exception ex)
  444. {
  445. return Json(new ReturnMessage { IsSuccess = false, Message = ex.Message });
  446. }
  447. }
  448. [HttpPost]
  449. public ActionResult DefaultClassNo(Guid SchoolyearID, Guid freeSelectionCourseID, string StartWeeklyNum, string EndWeeklyNum)
  450. {
  451. try
  452. {
  453. var result = ExecutableFreeSelectionCouseServices.DefaultClassNo(SchoolyearID, freeSelectionCourseID, StartWeeklyNum, EndWeeklyNum);
  454. return base.Json(result);
  455. }
  456. catch (Exception ex)
  457. {
  458. return Json("");
  459. }
  460. }
  461. public ActionResult GetSchedulingViewList(Guid ExecutableFreeSelectionCouseID)
  462. {
  463. var courseProcessList = this.ExecutableFreeSelectionCouseServices.GetSchedulingView(ExecutableFreeSelectionCouseID);
  464. return Json(new GridResultSet<ExecutableFreeSelectionCouseSchedulingView> { rows = courseProcessList, total = courseProcessList.Count });
  465. }
  466. /// <summary>
  467. /// 添加教室(排课检查)
  468. /// </summary>
  469. /// <returns></returns>
  470. public ActionResult CourseProcessClassroomList()
  471. {
  472. return View();
  473. }
  474. /// <summary>
  475. /// 添加节次(排课检查)
  476. /// </summary>
  477. /// <returns></returns>
  478. public ActionResult CoursesTimeList()
  479. {
  480. return View();
  481. }
  482. /// <summary>
  483. /// 列出课程进度中的可选教室
  484. /// </summary>
  485. /// <param name="pararms"></param>
  486. /// <returns></returns>
  487. [HttpPost]
  488. public ActionResult GetCourseProcessClassroomList(QueryParamsModel pararms)
  489. {
  490. ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
  491. int? classroomType = pararms.getExtraString("ClassroomType").ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : pararms.getExtraString("ClassroomType").ParseStrTo<int>();
  492. string schedulingWeek = pararms.getExtraString("schedulingWeek");
  493. int? weekday = pararms.getExtraString("weekDay").ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : pararms.getExtraString("weekDay").ParseStrTo<int>();
  494. var coursesTimeID = pararms.getExtraGuid("coursesTimeID") ?? Guid.Empty;
  495. //int? minSeatCount = pararms.getExtraString("MinSeatCount").ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : pararms.getExtraString("MinSeatCount").ParseStrTo<int>();
  496. //var collegeID = pararms.getExtraGuid("CollegeDropdown") ?? Guid.Empty;
  497. var buildingsID = pararms.getExtraInt("BuildingsDropdown") == DropdownList.SELECT_ALL ? null : pararms.getExtraGuid("BuildingsDropdown");
  498. return base.Json(ExecutableFreeSelectionCouseServices.GetAvailableClassroom(configuretView, buildingsID, schedulingWeek, weekday, coursesTimeID, classroomType, (int)pararms.page, (int)pararms.rows));
  499. }
  500. }
  501. }