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.

77 lines
2.5 KiB

4 days ago
  1. using NFine.Application;
  2. using NFine.Application.ProductManage;
  3. using NFine.Code;
  4. using NFine.Code.Excel;
  5. using NFine.Domain.Entity.ProductManage;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Data;
  9. using System.Linq;
  10. using System.Web.Mvc;
  11. namespace NFine.Web.Areas.SRM.Controllers
  12. {
  13. public class CAListController : ControllerBase
  14. {
  15. private CAManageApp App = new CAManageApp();
  16. [HttpGet]
  17. [HandlerAjaxOnly]
  18. public ActionResult GetCAListGridJson(Pagination pagination, string queryJson)
  19. {
  20. DataTable ListData = App.GetCAListGridJson(queryJson, ref pagination);
  21. var JsonData = new
  22. {
  23. total = pagination.total,
  24. page = pagination.page,
  25. records = pagination.records,
  26. rows = ListData,
  27. };
  28. return Content(JsonData.ToJson());
  29. }
  30. [HttpGet]
  31. [HandlerAjaxOnly]
  32. //public ActionResult GetSubGridJson(string queryJson,Pagination pagination)
  33. //{
  34. // DataTable ListData = App.GetSubGridJson(queryJson, ref pagination);
  35. // var JsonData = new
  36. // {
  37. // total = pagination.total,
  38. // page = pagination.page,
  39. // records = pagination.records,
  40. // rows = ListData,
  41. // };
  42. // //获取当前登录人信息;
  43. // return Content(JsonData.ToJson());
  44. //}
  45. public ActionResult Index()
  46. {
  47. return View();
  48. }
  49. [HttpPost]
  50. public void Export(string keyValue)
  51. {
  52. keyValue = keyValue.TrimEnd(',');
  53. //var data = maintainApp.GetList2(ids); //preselldetailApp.GetList2(keyValue, keyword);
  54. DataTable dt = App.GetASNListExport(keyValue);
  55. AsposeCell.Export(dt);
  56. //NPOIExcel helper = new NPOIExcel();
  57. //string title= DateTime.Now.ToString("yyyyMMddHHmmss");
  58. //string path= Server.MapPath("/File/");
  59. //helper.ToExcel(dt, title, "sheet1", path);
  60. }
  61. [HttpPost]
  62. public void ExportAll(string keyValue, string ORDERNO, string STNO, string BeginDate, string EndDate, string VenCode, string VenName, string VenderLotNO, string IsReceive)
  63. {
  64. DataTable dt = App.GetASNListExport(ORDERNO, STNO, BeginDate, EndDate, VenCode, VenName, VenderLotNO, IsReceive);
  65. AsposeCell.Export(dt);
  66. }
  67. }
  68. }