Hidistro.ControlPanel/Hidistro/ControlPanel/Store/EventLogs.cs

(完整代码) 1KB

namespace Hidistro.ControlPanel.Store
{
    using Hidistro.Core;
    using Hidistro.Core.Entities;
    using Hidistro.Entities.Store;
    using Hidistro.SqlDal.Store;
    using System;
    using System.Collections.Generic;
    using System.Web;

    public static class EventLogs
    {
        public static bool DeleteAllLogs()
        {
            return new LogDao().DeleteAllLogs();
        }

        public static bool DeleteLog(long logId)
        {
            return new LogDao().DeleteLog(logId);
        }

        public static int DeleteLogs(string strIds)
        {
            return new LogDao().DeleteLogs(strIds);
        }

        public static DbQueryResult GetLogs(OperationLogQuery query)
        {
            return new LogDao().GetLogs(query);
        }

        public static IList<string> GetOperationUseNames()
        {
            return new LogDao().GetOperationUserNames();
        }

        public static void WriteOperationLog(Privilege privilege, string description)
        {
            OperationLogEntry entry = new OperationLogEntry {
                AddedTime = DateTime.Now,
                Privilege = privilege,
                Description = description,
                IpAddress = Globals.IPAddress,
                PageUrl = HttpContext.Current.Request.RawUrl,
                UserName = ManagerHelper.GetCurrentManager().UserName
            };
            new LogDao().WriteOperationLogEntry(entry);
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。