StudentCountController.cs 2.9 KB

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