PostPracticeController.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using System.IO;
  7. using Bowin.Web.Controls.Mvc;
  8. using EMIS.Web.Controls;
  9. using EMIS.Utility;
  10. using EMIS.ViewModel;
  11. using EMIS.ViewModel.StudentManage.StudentProfile;
  12. using EMIS.CommonLogic.StudentManage.StudentProfile;
  13. namespace EMIS.Web.Controllers.StudentWeb.InfoCenter
  14. {
  15. [Authorization]
  16. public class PostPracticeController : Controller
  17. {
  18. public Lazy<IStudentPostPracticeServices> StudentPostPracticeServices { get; set; }
  19. /// <summary>
  20. /// 顶岗实习(学生)页面
  21. /// </summary>
  22. /// <returns></returns>
  23. public ActionResult List()
  24. {
  25. return View();
  26. }
  27. /// <summary>
  28. /// 顶岗实习(学生)列表查询
  29. /// </summary>
  30. /// <param name="pararms"></param>
  31. /// <returns></returns>
  32. [HttpPost]
  33. public ActionResult List(QueryParamsModel pararms)
  34. {
  35. var user = HttpContext.User as EMIS.Utility.FormValidate.CustomPrincipal;
  36. return Json(StudentPostPracticeServices.Value.GetStudentPostPracticeViewGrid(user.UserID, 1, pararms.page, pararms.rows));
  37. }
  38. /// <summary>
  39. /// 编辑
  40. /// </summary>
  41. /// <returns></returns>
  42. public ActionResult Edit()
  43. {
  44. var user = HttpContext.User as EMIS.Utility.FormValidate.CustomPrincipal;
  45. return View();
  46. }
  47. /// <summary>
  48. /// 编辑
  49. /// </summary>
  50. /// <returns></returns>
  51. [HttpPost]
  52. public ActionResult Edit(StudentPostPracticeView studentPostPracticeView)
  53. {
  54. try
  55. {
  56. var user = HttpContext.User as EMIS.Utility.FormValidate.CustomPrincipal;
  57. var studentPostPracticeViewList = DataGrid.GetTableData<StudentPostPracticeView>("dgStudentPostPracticeList");
  58. this.StudentPostPracticeServices.Value.StudentPostPracticeEdit(user.UserID, studentPostPracticeViewList);
  59. return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功。" });
  60. }
  61. catch (Exception ex)
  62. {
  63. return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败:" + ex.Message });
  64. }
  65. }
  66. /// <summary>
  67. /// 鉴定报表
  68. /// </summary>
  69. /// <returns></returns>
  70. public ActionResult AppraiseReport()
  71. {
  72. var curUser = EMIS.Utility.FormValidate.CustomPrincipal.Current;
  73. ViewBag.LoginUserID = curUser.UserID.ToString();
  74. return View();
  75. }
  76. /// <summary>
  77. /// Excel导出
  78. /// </summary>
  79. /// <returns></returns>
  80. [HttpPost]
  81. public ActionResult Excel()
  82. {
  83. return null;
  84. }
  85. }
  86. }