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.

96 lines
2.6 KiB

4 days ago
  1. using NFine.Application.SRM;
  2. using NFine.Code;
  3. using NFine.Domain._03_Entity.SRM;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Data;
  7. using System.Linq;
  8. using System.Web;
  9. using System.Web.Mvc;
  10. namespace NFine.Web.Areas.SRM.Controllers
  11. {
  12. public class ICSSrmMessageController : ControllerBase
  13. {
  14. ICSSrmMessageApp App = new ICSSrmMessageApp();
  15. //
  16. // GET: /SRM/ICSSrmMessage/
  17. public ActionResult MessageManagement()
  18. {
  19. return View();
  20. }
  21. public ActionResult MessageManagementAdd()
  22. {
  23. return View();
  24. }
  25. public ActionResult MessageManagementUpdate()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 查询消息信息
  31. /// </summary>
  32. /// <param name="pagination"></param>
  33. /// <param name="queryJson"></param>
  34. /// <returns></returns>
  35. [HttpGet]
  36. [HandlerAjaxOnly]
  37. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  38. {
  39. DataTable ListData = App.GetGridJson(queryJson, ref pagination);
  40. var JsonData = new
  41. {
  42. total = pagination.total,
  43. page = pagination.page,
  44. records = pagination.records,
  45. rows = ListData,
  46. };
  47. return Content(JsonData.ToJson());
  48. }
  49. /// <summary>
  50. /// 删除消息信息
  51. /// </summary>
  52. /// <param name="keyValue"></param>
  53. /// <returns></returns>
  54. [HttpPost]
  55. [HandlerAjaxOnly]
  56. [ValidateAntiForgeryToken]
  57. public ActionResult DeleteICSSrmMessage(string keyValue)
  58. {
  59. string msg = App.DeleteICSSrmMessage(keyValue);
  60. if (string.IsNullOrWhiteSpace(msg))
  61. {
  62. return Success("删除成功!");
  63. }
  64. else
  65. {
  66. return Error("删除失败");
  67. }
  68. }
  69. [HttpPost]
  70. public ActionResult SubmitICSSrmMessage(string keyValue)
  71. {
  72. try
  73. {
  74. App.SaveDetail(keyValue);
  75. return Success("保存成功!");
  76. }
  77. catch (Exception ex)
  78. {
  79. return Error(ex.Message);
  80. }
  81. }
  82. [HttpGet]
  83. [HandlerAjaxOnly]
  84. public ActionResult ICSICSSrmMessageByCreate(string MESSAGEID)
  85. {
  86. DataTable ListData = App.ICSICSSrmMessageByCreate(MESSAGEID);
  87. var JsonData = new
  88. {
  89. rows = ListData,
  90. };
  91. return Content(JsonData.ToJson());
  92. }
  93. }
  94. }