StudentCountController.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using EMIS.Web.Controls;
  7. using EMIS.CommonLogic.CalendarManage;
  8. using EMIS.CommonLogic.UniversityManage.AdministrativeOrgan;
  9. namespace EMIS.Web.Controllers.StudentManage.StudentStatistics
  10. {
  11. [Authorization]
  12. public class StudentCountController : Controller
  13. {
  14. public ISchoolYearServices SchoolYearServices { get; set; }
  15. public IUniversityServices universityServices { get; set; }
  16. /// <summary>
  17. ///
  18. /// </summary>
  19. /// <returns></returns>
  20. public ActionResult Index()
  21. {
  22. var university = universityServices.GetUniversityList().FirstOrDefault().Name;
  23. var schoolYear = SchoolYearServices.GetSchoolYearIsCurrent(true);
  24. ViewBag.SchoolYearID = university+schoolYear.Code + "学生学籍信息统计表";//默认当前学年
  25. return View();
  26. }
  27. //
  28. // GET: /StudentCount/Details/5
  29. public ActionResult Details(int id)
  30. {
  31. return View();
  32. }
  33. //
  34. // GET: /StudentCount/Create
  35. public ActionResult Create()
  36. {
  37. return View();
  38. }
  39. //
  40. // POST: /StudentCount/Create
  41. [HttpPost]
  42. public ActionResult Create(FormCollection collection)
  43. {
  44. try
  45. {
  46. // TODO: Add insert logic here
  47. return RedirectToAction("Index");
  48. }
  49. catch
  50. {
  51. return View();
  52. }
  53. }
  54. //
  55. // GET: /StudentCount/Edit/5
  56. public ActionResult Edit(int id)
  57. {
  58. return View();
  59. }
  60. //
  61. // POST: /StudentCount/Edit/5
  62. [HttpPost]
  63. public ActionResult Edit(int id, FormCollection collection)
  64. {
  65. try
  66. {
  67. // TODO: Add update logic here
  68. return RedirectToAction("Index");
  69. }
  70. catch
  71. {
  72. return View();
  73. }
  74. }
  75. //
  76. // GET: /StudentCount/Delete/5
  77. public ActionResult Delete(int id)
  78. {
  79. return View();
  80. }
  81. //
  82. // POST: /StudentCount/Delete/5
  83. [HttpPost]
  84. public ActionResult Delete(int id, FormCollection collection)
  85. {
  86. try
  87. {
  88. // TODO: Add delete logic here
  89. return RedirectToAction("Index");
  90. }
  91. catch
  92. {
  93. return View();
  94. }
  95. }
  96. public ActionResult StudentCountPDF(int? InSchoolStatusID)
  97. {
  98. var pdf = NewReportServices.StudentCountPDF(InSchoolStatusID);
  99. return File(pdf.ToArray(), "application/pdf");
  100. }
  101. }
  102. }