Example #1
0
        /// <summary>
        /// 创建管理员操作日志
        /// </summary>
        /// <param name="uid">用户id</param>
        /// <param name="nickName">用户昵称</param>
        /// <param name="adminGid">管理员组id</param>
        /// <param name="adminGTitle">管理员组标题</param>
        /// <param name="ip">ip</param>
        /// <param name="operation">操作行为</param>
        /// <param name="description">操作描述</param>
        public static void CreateAdminOperateLog(int uid, string nickName, int adminGid, string adminGTitle, string ip, string operation, string description)
        {
            AdminOperateLogInfo adminOperateLogInfo = new AdminOperateLogInfo
            {
                Uid         = uid,
                NickName    = nickName,
                AdminGid    = adminGid,
                AdminGTitle = adminGTitle,
                IP          = ip,
                OperateTime = DateTime.Now,
                Operation   = operation,
                Description = description
            };

            BrnShop.Data.AdminOperateLogs.CreateAdminOperateLog(adminOperateLogInfo);
        }
Example #2
0
        /// <summary>
        /// 获得管理员操作日志列表
        /// </summary>
        /// <param name="pageSize">每页数</param>
        /// <param name="pageNumber">当前页数</param>
        /// <param name="condition">条件</param>
        /// <returns></returns>
        public static List <AdminOperateLogInfo> GetAdminOperateLogList(int pageSize, int pageNumber, string condition)
        {
            List <AdminOperateLogInfo> adminOperateLogList = new List <AdminOperateLogInfo>();
            IDataReader reader = BrnShop.Core.BSPData.RDBS.GetAdminOperateLogList(pageSize, pageNumber, condition);

            while (reader.Read())
            {
                AdminOperateLogInfo adminOperateLogInfo = new AdminOperateLogInfo();
                adminOperateLogInfo.LogId       = TypeHelper.ObjectToInt(reader["logid"]);
                adminOperateLogInfo.Uid         = TypeHelper.ObjectToInt(reader["uid"]);
                adminOperateLogInfo.NickName    = reader["nickname"].ToString();
                adminOperateLogInfo.AdminGid    = TypeHelper.ObjectToInt(reader["admingid"]);
                adminOperateLogInfo.AdminGTitle = reader["admingtitle"].ToString();
                adminOperateLogInfo.Operation   = reader["operation"].ToString();
                adminOperateLogInfo.Description = reader["description"].ToString();
                adminOperateLogInfo.IP          = reader["ip"].ToString();
                adminOperateLogInfo.OperateTime = TypeHelper.ObjectToDateTime(reader["operatetime"]);
                adminOperateLogList.Add(adminOperateLogInfo);
            }
            reader.Close();
            return(adminOperateLogList);
        }
Example #3
0
 /// <summary>
 /// 创建管理员操作日志
 /// </summary>
 public static void CreateAdminOperateLog(AdminOperateLogInfo adminOperateLogInfo)
 {
     BrnShop.Core.BSPData.RDBS.CreateAdminOperateLog(adminOperateLogInfo);
 }