纽威
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.

47 lines
1.4 KiB

2 years ago
  1. using NFine.Application.WMS;
  2. using NFine.Code;
  3. using System.Data;
  4. using System.Web.Mvc;
  5. namespace NFine.Web.Areas.WMS.Controllers
  6. {
  7. public class UerListController : ControllerBase
  8. {
  9. UserListApp App = new UserListApp();
  10. //
  11. // GET: /SRM/UerList/
  12. public ActionResult UserList()
  13. {
  14. return View();
  15. }
  16. public ActionResult GetUserList(string queryJson, Pagination pagination)
  17. {
  18. DataTable ListData = App.GetUserList(queryJson, ref pagination);
  19. var JsonData = new
  20. {
  21. total = pagination.total,
  22. page = pagination.page,
  23. records = pagination.records,
  24. rows = ListData,
  25. };
  26. return Content(JsonData.ToJson());
  27. }
  28. public ActionResult GetUserListDetails(string queryJson, Pagination pagination)
  29. {
  30. DataTable ListData = App.GetUserListDetails(queryJson, ref pagination);
  31. var JsonData = new
  32. {
  33. total = pagination.total,
  34. page = pagination.page,
  35. records = pagination.records,
  36. rows = ListData,
  37. };
  38. return Content(JsonData.ToJson());
  39. }
  40. [HttpPost]
  41. public void ExportAll(string UserCode, string UserName)
  42. {
  43. DataTable dt = App.GetASNListExport(UserCode, UserName);
  44. AsposeCell.Export(dt);
  45. }
  46. }
  47. }