StudentMinorRegistController.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.MinorManage.MinorApply;
  7. using EMIS.Utility.FormValidate;
  8. using EMIS.ViewModel;
  9. namespace EMIS.Web.Controllers.MinorManage.MinorApply
  10. {
  11. [Authorization]
  12. public class StudentMinorRegistController : Controller
  13. {
  14. //
  15. // GET: /StudentMinor/
  16. public IStudentMinorServices studentMinorServices { get; set; }
  17. [HttpGet]
  18. public ActionResult List()
  19. {
  20. var user = CustomPrincipal.Current;
  21. var studentMinor = studentMinorServices.GetMinorApplyView(user.UserID);
  22. return View(studentMinor);
  23. }
  24. [HttpPost]
  25. public ActionResult List(QueryParamsModel pararms)
  26. {
  27. return base.Json(studentMinorServices.GetMinorSpecialtyViewByUserIDGrid(CustomPrincipal.Current.UserID, pararms.page, pararms.rows));
  28. }
  29. [HttpPost]
  30. public ActionResult Cancel(Guid? userID, Guid? studentMinorRegistID)
  31. {
  32. try
  33. {
  34. studentMinorServices.StudentMinorCancel(userID, studentMinorRegistID);
  35. return base.Json("取消成功。");
  36. }
  37. catch (Exception ex)
  38. {
  39. return base.Json("取消失败,原因:" + ex.Message);
  40. }
  41. }
  42. }
  43. }