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.
 
 
 
 
 
 

93 lines
2.8 KiB

  1. using Learun.Application.CRM;
  2. using System.Web.Mvc;
  3. namespace Learun.Application.Web.Areas.LR_CRMModule.Controllers
  4. {
  5. /// <summary>
  6. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  7. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  8. /// 创 建:超级管理员
  9. /// 日 期:2017-07-11 09:58
  10. /// 描 述:客户联系人
  11. /// </summary>
  12. public class CustomerContactController : MvcControllerBase
  13. {
  14. private CrmCustomerContactIBLL crmCustomerContactIBLL = new CrmCustomerContactBLL();
  15. #region 视图功能
  16. /// <summary>
  17. /// 联系人列表
  18. /// </summary>
  19. /// <returns></returns>
  20. [HttpGet]
  21. public ActionResult ContactIndex()
  22. {
  23. return View();
  24. }
  25. /// <summary>
  26. /// 联系人表单
  27. /// </summary>
  28. /// <returns></returns>
  29. [HttpGet]
  30. public ActionResult ContactForm()
  31. {
  32. return View();
  33. }
  34. #endregion
  35. #region 获取数据
  36. /// <summary>
  37. /// 获取联系人列表
  38. /// </summary>
  39. /// <param name="queryJson">查询参数</param>
  40. /// <returns>返回列表Json</returns>
  41. [HttpGet]
  42. public ActionResult GetContactListJson(string queryJson)
  43. {
  44. var data = crmCustomerContactIBLL.GetList(queryJson);
  45. return JsonResult(data);
  46. }
  47. /// <summary>
  48. /// 获取联系人实体
  49. /// </summary>
  50. /// <param name="keyValue">主键值</param>
  51. /// <returns>返回对象Json</returns>
  52. [HttpGet]
  53. public ActionResult GetContactFormJson(string keyValue)
  54. {
  55. var data = crmCustomerContactIBLL.GetEntity(keyValue);
  56. return JsonResult(data);
  57. }
  58. #endregion
  59. #region 提交数据
  60. /// <summary>
  61. /// 删除联系人数据
  62. /// </summary>
  63. /// <param name="keyValue">主键值</param>
  64. /// <returns></returns>
  65. [HttpPost]
  66. [AjaxOnly]
  67. public ActionResult DeleteContactForm(string keyValue)
  68. {
  69. crmCustomerContactIBLL.DeleteEntity(keyValue);
  70. return Success("删除成功。");
  71. }
  72. /// <summary>
  73. /// 保存联系人表单(新增、修改)
  74. /// </summary>
  75. /// <param name="keyValue">主键值</param>
  76. /// <param name="entity">实体对象</param>
  77. /// <returns></returns>
  78. [HttpPost]
  79. [ValidateAntiForgeryToken]
  80. [AjaxOnly]
  81. public ActionResult SaveContactForm(string keyValue, CrmCustomerContactEntity entity)
  82. {
  83. crmCustomerContactIBLL.SaveEntity(keyValue, entity);
  84. return Success("操作成功。");
  85. }
  86. #endregion
  87. }
  88. }