EvaluationSensitiveWordController.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 EvaluationSensitiveWordController : Controller
  15. {
  16. public Lazy<IEvaluationSensitiveWordServices> EvaluationSensitiveWordServices { get; set; }
  17. /// <summary>
  18. /// 敏感词页面
  19. /// </summary>
  20. /// <returns></returns>
  21. public ActionResult List()
  22. {
  23. return View(EvaluationSensitiveWordServices.Value.GetEvaluationSensitiveWordView());
  24. }
  25. /// <summary>
  26. /// 敏感词保存
  27. /// </summary>
  28. /// <param name="evaluationSensitiveWordView"></param>
  29. /// <returns></returns>
  30. [HttpPost]
  31. public ActionResult List(EvaluationSensitiveWordView evaluationSensitiveWordView)
  32. {
  33. try
  34. {
  35. EvaluationSensitiveWordServices.Value.EvaluationSensitiveWordSave(evaluationSensitiveWordView);
  36. return Json(new ReturnMessage { IsSuccess = true, Message = "保存成功。" });
  37. }
  38. catch (Exception ex)
  39. {
  40. return Json(new ReturnMessage { IsSuccess = false, Message = "保存失败,原因:" + ex.Message });
  41. }
  42. }
  43. }
  44. }