| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- 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 = "";
- if (Table == "kf_quick_msgs")
- {
- strWhere = " 1=1 ";
- }
- else
- {
- strWhere += " ContentNew='操作记录' ";
- }
- 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))
- {//JsonConvert.SerializeObject(model)
- AddAction("t_com_logaction", id, "删除操作日志" );
- return Success("删除成功");
- }
- else
- return Error("失败");
- }
- }
- }
|