BaseItemController.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. using WMS.Core;
  2. using WMS.Util;
  3. using System.Data;
  4. using Microsoft.AspNetCore.Mvc;using WMS.BZWeb;
  5. using WMS.Info;
  6. using WMS.Core.ServiceCore.FeiXu;
  7. namespace WMS.BZWeb
  8. {
  9. /// <summary>
  10. /// 描 述:物料管理
  11. /// </summary>
  12. [Area("BaseManager")]
  13. public class BaseItemController : MvcControllerBase
  14. {
  15. private FxBaseItemCore bll = new FxBaseItemCore();
  16. /// <summary>
  17. /// 主页面
  18. /// <summary>
  19. /// <returns></returns>
  20. [HttpGet]
  21. public ActionResult Index()
  22. {
  23. return View();
  24. }
  25. /// <summary>
  26. /// 表单页
  27. /// <summary>
  28. /// <returns></returns>
  29. [HttpGet]
  30. public ActionResult Form()
  31. {
  32. return View();
  33. }
  34. /// <summary>
  35. /// 获取列表数据
  36. /// <summary>
  37. /// <returns></returns>
  38. [HttpGet]
  39. ////[AjaxOnly]
  40. public ActionResult GetList(string keyword)
  41. {
  42. var data = bll.GetList(keyword);
  43. return Success("", data);
  44. }
  45. /// <summary>
  46. /// 获取分页数据
  47. /// </summary>
  48. /// <param name="pagination">分页参数</param>
  49. /// <param name="keyword">查询关键字</param>
  50. /// <returns></returns>
  51. [HttpGet]
  52. ////[AjaxOnly]
  53. public ActionResult GetPageList(string pagination, string keyword)
  54. {
  55. Pagination paginationobj = InitPagination(pagination);
  56. return ToPageDataResult(paginationobj, bll.GetPageList(keyword, paginationobj));
  57. }
  58. /// <summary>
  59. /// 启用
  60. /// <param name="keyValue">主键</param>
  61. /// <summary>
  62. /// <returns></returns>
  63. [HttpPost]
  64. ////[AjaxOnly]
  65. public ActionResult Enable(int no)
  66. {
  67. bll.IsEnable(no,false);
  68. return Success("启用成功。");
  69. }
  70. /// <summary>
  71. /// 禁用
  72. /// <param name="keyValue">主键</param>
  73. /// <summary>
  74. /// <returns></returns>
  75. [HttpPost]
  76. ////[AjaxOnly]
  77. public ActionResult Disable(int no)
  78. {
  79. bll.IsEnable(no,true);
  80. return Success("禁用成功。");
  81. }
  82. }
  83. }