| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.IO;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using YTSoft.BaseCallCenter.Model;
- using YTSoft.BaseCallCenter.MVCWeb.Models;
- /// <summary>
- /// 客服快捷回复
- /// </summary>
- namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
- {
- public class LogActionController : BaseController
- {
- BLL.T_Com_LogAction busLogAction = new BLL.T_Com_LogAction();
-
- #region 纯视图
- /// <summary>
- /// 回复列表
- /// </summary>
- /// <returns></returns>
- public ActionResult GetList()
- {
- return View();
- }
- #endregion
- [ActionName("GetListData")]
- public string GetListData(string Table = "", string id = "", int page = 0, int limit = 20)
- {
- string strWhere = " 1=1 ";
- if (!string.IsNullOrEmpty(Table))
- {
- strWhere += string.Format(" and TableName = '{0}'", Table);
- }
- if (!string.IsNullOrEmpty(id))
- {
- strWhere += string.Format(" and TableId ={0}", id);
- }
- DataTable dt = busLogAction.GetListByPage(strWhere, " atime desc ", (page - 1) * limit, limit).Tables[0];
- int count = busLogAction.GetRecordCount(strWhere);
- return Success("成功", dt, count);
- }
- [ActionName("GetData")]
- public string GettData(string id)
- {
- if (string.IsNullOrEmpty(id))
- return Error("请输入ID");
- Model.T_Com_LogAction model = busLogAction.GetModel(id);
- return Success("成功", model, 1);
- }
- [ActionName("deletedata")]
- public string DeleteData(string id)
- {
- if (string.IsNullOrEmpty(id))
- return Error("请输入ID");
- Model.T_Com_LogAction model = busLogAction.GetModel(id);
- if (busLogAction.Delete(id))
- {
- AddLog("T_Com_LogAction", model.Id, "删除消息", JsonConvert.SerializeObject(model), "");
- return Success("删除成功");
- }
- else
- return Error("失败");
- }
- }
- }
|