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

58 lines
1.6 KiB

11 months ago
  1. using NFine.Application.WMS;
  2. using NFine.Code;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. namespace NFine.Web.Areas.WMS.Controllers
  10. {
  11. public class ExpressageController : ControllerBase
  12. {
  13. ExpressageApp App = new ExpressageApp();
  14. public ActionResult ExpressageForm()
  15. {
  16. return View();
  17. }
  18. public ActionResult ExpressageList()
  19. {
  20. return View();
  21. }
  22. public ActionResult InsertExpressage(string Code, string Expressage, string ExpressageCode)
  23. {
  24. string msg = App.InsertExpressage(Code, Expressage, ExpressageCode);
  25. if (!string.IsNullOrEmpty(msg))
  26. {
  27. return Error(msg);
  28. }
  29. else
  30. {
  31. return Success("添加成功!");
  32. }
  33. }
  34. //获取快递公司列表
  35. public ActionResult GetExpressageList()
  36. {
  37. DataTable dt = App.GetExpressageList();
  38. return Content(dt.ToJson());
  39. }
  40. [HttpGet]
  41. public ActionResult GetExpressage(Pagination pagination, string queryJson)
  42. {
  43. DataTable ListData = App.GetExpressage(ref pagination, queryJson);
  44. var JsonData = new
  45. {
  46. total = pagination.total,
  47. page = pagination.page,
  48. records = pagination.records,
  49. rows = ListData,
  50. };
  51. return Content(JsonData.ToJson());
  52. }
  53. }
  54. }