using Learun.Application.CRM; using System.Web.Mvc; namespace Learun.Application.Web.Areas.LR_CRMModule.Controllers { /// /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 /// Copyright (c) 2013-2018 北京泉江科技有限公司 /// 创 建:超级管理员 /// 日 期:2017-07-11 09:58 /// 描 述:客户联系人 /// public class CustomerContactController : MvcControllerBase { private CrmCustomerContactIBLL crmCustomerContactIBLL = new CrmCustomerContactBLL(); #region 视图功能 /// /// 联系人列表 /// /// [HttpGet] public ActionResult ContactIndex() { return View(); } /// /// 联系人表单 /// /// [HttpGet] public ActionResult ContactForm() { return View(); } #endregion #region 获取数据 /// /// 获取联系人列表 /// /// 查询参数 /// 返回列表Json [HttpGet] public ActionResult GetContactListJson(string queryJson) { var data = crmCustomerContactIBLL.GetList(queryJson); return JsonResult(data); } /// /// 获取联系人实体 /// /// 主键值 /// 返回对象Json [HttpGet] public ActionResult GetContactFormJson(string keyValue) { var data = crmCustomerContactIBLL.GetEntity(keyValue); return JsonResult(data); } #endregion #region 提交数据 /// /// 删除联系人数据 /// /// 主键值 /// [HttpPost] [AjaxOnly] public ActionResult DeleteContactForm(string keyValue) { crmCustomerContactIBLL.DeleteEntity(keyValue); return Success("删除成功。"); } /// /// 保存联系人表单(新增、修改) /// /// 主键值 /// 实体对象 /// [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] public ActionResult SaveContactForm(string keyValue, CrmCustomerContactEntity entity) { crmCustomerContactIBLL.SaveEntity(keyValue, entity); return Success("操作成功。"); } #endregion } }