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

61 lines
1.7 KiB

3 years ago
  1. using NFine.Application.ProductManage;
  2. using NFine.Code;
  3. using NFine.Domain.Entity.ProductManage;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Web.Mvc;
  7. namespace NFine.Web.Areas.ProductManage.Controllers
  8. {
  9. public class RapaPortController : ControllerBase
  10. {
  11. private DiscountRateApp discountrateApp = new DiscountRateApp();
  12. [HttpGet]
  13. [HandlerAjaxOnly]
  14. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  15. {
  16. var data = new
  17. {
  18. rows = discountrateApp.GetList2(pagination, queryJson),
  19. total = pagination.total,
  20. page = pagination.page,
  21. records = pagination.records
  22. };
  23. return Content(data.ToJson());
  24. }
  25. [HttpGet]
  26. [HandlerAjaxOnly]
  27. public ActionResult GetFormJson(string keyValue)
  28. {
  29. var data = discountrateApp.GetForm(keyValue);
  30. return Content(data.ToJson());
  31. }
  32. [HttpPost]
  33. [HandlerAjaxOnly]
  34. [ValidateAntiForgeryToken]
  35. public ActionResult SubmitForm(ICSDiscountRateEntity discountrateEntity, string keyValue)
  36. {
  37. discountrateApp.SubmitForm(discountrateEntity, keyValue);
  38. return Success("Successful operation.");
  39. }
  40. [HttpPost]
  41. [HandlerAjaxOnly]
  42. [HandlerAuthorize]
  43. [ValidateAntiForgeryToken]
  44. public ActionResult DeleteForm(string keyValue)
  45. {
  46. discountrateApp.DeleteForm(keyValue);
  47. return Success("Delete success.");
  48. }
  49. public ActionResult Forms()
  50. {
  51. return View();
  52. }
  53. }
  54. }