using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Service;
using Domain;
namespace WebSite.Controllers
{
public class SysSystemLogsController : BaseController
{
public ISysAuthorityManager SysAuthorityManager { get; set; }
#region Action
[Authorize]
public ActionResult Index()
{
return View("SimonIndex");
}
[Authorize]
public ActionResult LoadAllByPage(int page, int rows, string order, string sort, int? authorityId, DateTime? startDate, DateTime? endDate, string keyword)
{
long total = 0;
if (string.IsNullOrEmpty(keyword)) keyword = "";
var list = this.SysSystemLogsManager.LoadAllByPage(out total, page, rows, order, sort, authorityId, startDate, endDate, keyword, CurrentHotelID);
var result = list.Select(r =>
{
var authority = SysAuthorityManager.Get(r.AuthorityID);
return new
{
r.ID,
r.Account,
Authority = authority != null ? ReturnNameByLanguage(authority.Name, authority.EName, authority.TWName) : "",
r.Action,
r.Detail,
r.Result,
r.IP,
r.Time
};
});
return Json(new { total = total, rows = result });
}
///
/// 删除多条数据
///
///
///
[Authorize]
public ActionResult Delete(IList idList)
{
SysSystemLogsManager.Delete(idList.Cast