PartitionDrawController.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using LeaRun.Application.Busines.DMAManage;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Mvc;
  7. namespace LeaRun.Application.Web.Areas.DMAManage.Controllers
  8. {
  9. public class PartitionDrawController : MvcControllerBase
  10. {
  11. // 分区绘制
  12. // GET: /DMAManage/PartitionDraw/
  13. PartitionDrawBLL partitionDrawBLL = new PartitionDrawBLL();
  14. #region 视图区域
  15. public ActionResult Index()
  16. {
  17. return View();
  18. }
  19. #endregion
  20. #region 获取所有分区数据
  21. /// <summary>
  22. /// 获取所有分区数据
  23. /// </summary>
  24. /// <returns></returns>
  25. [HttpGet]
  26. public ActionResult GetAllPartitions()
  27. {
  28. return Content(partitionDrawBLL.GetAllPartitions());
  29. }
  30. #endregion
  31. #region 保存数据
  32. /// <summary>
  33. /// 保存数据
  34. /// </summary>
  35. /// <param name="datas"></param>
  36. /// <returns></returns>
  37. [HttpPost]
  38. [ValidateAntiForgeryToken]
  39. [AjaxOnly]
  40. public ActionResult SavePoints(string datas)
  41. {
  42. if (partitionDrawBLL.SavePoints(datas) == 0)
  43. {
  44. return Success("保存成功!");
  45. }
  46. else
  47. {
  48. return Error("保存失败!");
  49. }
  50. }
  51. #endregion
  52. }
  53. }