纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

3 years ago
  1. using NFine.Application.SystemManage;
  2. using NFine.Code;
  3. using NFine.Domain.Entity.SystemManage;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Web.Mvc;
  7. namespace NFine.Web.Areas.SystemManage.Controllers
  8. {
  9. public class DutyController : ControllerBase
  10. {
  11. private DutyApp dutyApp = new DutyApp();
  12. [HttpGet]
  13. [HandlerAjaxOnly]
  14. public ActionResult GetGridJson(string keyword)
  15. {
  16. var data = dutyApp.GetList(keyword);
  17. return Content(data.ToJson());
  18. }
  19. [HttpGet]
  20. [HandlerAjaxOnly]
  21. public ActionResult GetFormJson(string keyValue)
  22. {
  23. var data = dutyApp.GetForm(keyValue);
  24. return Content(data.ToJson());
  25. }
  26. [HttpPost]
  27. [HandlerAjaxOnly]
  28. [ValidateAntiForgeryToken]
  29. public ActionResult SubmitForm(RoleEntity roleEntity, string keyValue)
  30. {
  31. dutyApp.SubmitForm(roleEntity, keyValue);
  32. return Success("操作成功。");
  33. }
  34. [HttpPost]
  35. [HandlerAjaxOnly]
  36. [HandlerAuthorize]
  37. [ValidateAntiForgeryToken]
  38. public ActionResult DeleteForm(string keyValue)
  39. {
  40. dutyApp.DeleteForm(keyValue);
  41. return Success("删除成功。");
  42. }
  43. }
  44. }