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.
 
 
 
 
 
 

118 lines
3.4 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.Permission;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. namespace Learun.Application.Web.Areas.Permission.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2019-07-09 10:45
  13. /// 描 述:统一认证访问日志
  14. /// </summary>
  15. public class Perm_FunctionVisitController : MvcControllerBase
  16. {
  17. private Perm_FunctionVisitIBLL perm_FunctionVisitIBLL = new Perm_FunctionVisitBLL();
  18. #region 视图功能
  19. /// <summary>
  20. /// 主页面
  21. /// <summary>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult Index()
  25. {
  26. return View();
  27. }
  28. [HttpGet]
  29. public ActionResult IndexForCount()
  30. {
  31. return View();
  32. }
  33. /// <summary>
  34. /// 表单页
  35. /// <summary>
  36. /// <returns></returns>
  37. [HttpGet]
  38. public ActionResult Form()
  39. {
  40. return View();
  41. }
  42. #endregion
  43. #region 获取数据
  44. /// <summary>
  45. /// 获取页面显示列表数据
  46. /// <summary>
  47. /// <param name="queryJson">查询参数</param>
  48. /// <returns></returns>
  49. [HttpGet]
  50. [AjaxOnly]
  51. public ActionResult GetPageList(string pagination, string queryJson)
  52. {
  53. Pagination paginationobj = pagination.ToObject<Pagination>();
  54. var data = perm_FunctionVisitIBLL.GetPageList(paginationobj, queryJson);
  55. var jsonData = new
  56. {
  57. rows = data,
  58. total = paginationobj.total,
  59. page = paginationobj.page,
  60. records = paginationobj.records
  61. };
  62. return Success(jsonData);
  63. }
  64. /// <summary>
  65. /// 获取表单数据
  66. /// <summary>
  67. /// <returns></returns>
  68. [HttpGet]
  69. [AjaxOnly]
  70. public ActionResult GetFormData(string keyValue)
  71. {
  72. var Perm_FunctionVisitData = perm_FunctionVisitIBLL.GetPerm_FunctionVisitEntity( keyValue );
  73. var jsonData = new {
  74. Perm_FunctionVisit = Perm_FunctionVisitData,
  75. };
  76. return Success(jsonData);
  77. }
  78. #endregion
  79. #region 提交数据
  80. /// <summary>
  81. /// 删除实体数据
  82. /// <param name="keyValue">主键</param>
  83. /// <summary>
  84. /// <returns></returns>
  85. [HttpPost]
  86. [AjaxOnly]
  87. public ActionResult DeleteForm(string keyValue)
  88. {
  89. perm_FunctionVisitIBLL.DeleteEntity(keyValue);
  90. return Success("删除成功!");
  91. }
  92. /// <summary>
  93. /// 保存实体数据(新增、修改)
  94. /// <param name="keyValue">主键</param>
  95. /// <summary>
  96. /// <returns></returns>
  97. [HttpPost]
  98. [ValidateAntiForgeryToken]
  99. [AjaxOnly]
  100. public ActionResult SaveForm(string keyValue, string strEntity)
  101. {
  102. Perm_FunctionVisitEntity entity = strEntity.ToObject<Perm_FunctionVisitEntity>();
  103. perm_FunctionVisitIBLL.SaveEntity(keyValue,entity);
  104. return Success("保存成功!");
  105. }
  106. #endregion
  107. }
  108. }