EvaluationControlController.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Web;
  6. using System.Web.Mvc;
  7. using EMIS.Web.Controls;
  8. using EMIS.ViewModel;
  9. using EMIS.ViewModel.EvaluationManage.EvaluationSetting;
  10. using EMIS.CommonLogic.EvaluationManage.EvaluationSetting;
  11. namespace EMIS.Web.Controllers.EvaluationManage.EvaluationSetting
  12. {
  13. [Authorization]
  14. public class EvaluationControlController : Controller
  15. {
  16. public IEvaluationControlServices EvaluationControlServices { get; set; }
  17. /// <summary>
  18. /// 评价控制页面
  19. /// </summary>
  20. /// <returns></returns>
  21. public ActionResult List()
  22. {
  23. var evaluationControlView = new EvaluationControlView();
  24. evaluationControlView = EvaluationControlServices.GetEvaluationControlView();
  25. return View(evaluationControlView);
  26. }
  27. /// <summary>
  28. /// 评价控制保存
  29. /// </summary>
  30. /// <param name="evaluationControlView"></param>
  31. /// <returns></returns>
  32. [HttpPost]
  33. public ActionResult List(EvaluationControlView evaluationControlView)
  34. {
  35. try
  36. {
  37. EvaluationControlServices.EvaluationControlSave(evaluationControlView);
  38. return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功。" });
  39. }
  40. catch (Exception ex)
  41. {
  42. return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败,原因:" + ex.Message });
  43. }
  44. }
  45. }
  46. }