NBAreasController.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using LeaRun.Application.Busines.NBManage;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Mvc;
  7. using LeaRun.Util.WebControl;
  8. using LeaRun.Util;
  9. namespace LeaRun.Application.Web.Areas.NBManage.Controllers
  10. {
  11. /// <summary>
  12. /// 地区tree列表获取
  13. /// </summary>
  14. public class NBAreasController : MvcControllerBase
  15. {
  16. NBAreasBLL bll = new NBAreasBLL();
  17. #region 获取可扩展列表
  18. /// <summary>
  19. /// 获取可扩展列表
  20. /// </summary>
  21. /// <param name="showcheck"></param>
  22. /// <returns></returns>
  23. [HttpGet]
  24. public ActionResult GetTreeJson(bool showcheck = true)
  25. {
  26. return Content(bll.GetTreeEntity("0", showcheck, 0).ToList().TreeToJson("0"));
  27. }
  28. public ActionResult GetAreaTreeJson(bool showcheck = true)
  29. {
  30. return Content(bll.GetAreaTreeJson("0", showcheck).ToList().TreeToJson("0"));
  31. }
  32. #endregion
  33. }
  34. }