DQPCommunicateController.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.DQPSystem;
  7. using EMIS.ViewModel;
  8. using EMIS.Web.Controls;
  9. using EMIS.Utility.FormValidate;
  10. namespace EMIS.Web.Controllers.DQPSystem
  11. {
  12. [Authorization]
  13. public class DQPCommunicateController : Controller
  14. {
  15. public ICommunicateServices CommunicateServices { get; set; }
  16. public ActionResult TeacherList()
  17. {
  18. return View();
  19. }
  20. [HttpPost]
  21. public ActionResult TeacherList(QueryParamsModel pararms)
  22. {
  23. ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
  24. var schoolyearID = pararms.getExtraGuid("ddlSchoolyear");
  25. var coursematerialID = pararms.getExtraGuid("cgbCourse");
  26. var userID = CustomPrincipal.Current.UserID;
  27. return base.Json(CommunicateServices.GetTeacherCommunicateViewList(configuretView, schoolyearID.Value, coursematerialID.Value, userID, (int)pararms.page, (int)pararms.rows));
  28. }
  29. public ActionResult StudentList()
  30. {
  31. return View();
  32. }
  33. [HttpPost]
  34. public ActionResult StudentList(QueryParamsModel pararms)
  35. {
  36. ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
  37. var schoolyearID = pararms.getExtraGuid("ddlSchoolyear");
  38. var coursematerialID = pararms.getExtraGuid("cgbCourse");
  39. var userID = CustomPrincipal.Current.UserID;
  40. return base.Json(CommunicateServices.GetStudentCommunicateViewList(configuretView, schoolyearID.Value, coursematerialID.Value, userID, (int)pararms.page, (int)pararms.rows));
  41. }
  42. }
  43. }