/// <summary> /// 添加操作记录(不与数据库进行交互) /// </summary> /// <param name="actionType">操作动作类型(1:增,2:修改,3:查看,4:删除)</param> /// <param name="title">操作标题</param> /// <param name="content">操作内容</param> public static void AddOperation(int actionType, string title, string content) { AuthorDesign.Model.AdminOperation operation = new Model.AdminOperation() { Action = actionType, AdminId = WebCookieHelper.GetAdminId(0), AuthoryId = WebCookieHelper.GetAdminId(6), Content = content, CreateTime = DateTime.Now, IsSuperAdmin = (byte)WebCookieHelper.GetAdminId(5), Title = title, OperateIP = IpHelper.GetRealIP(), OperateInfo = IpHelper.GetBrowerVersion() }; operation.OperateAddress = IpHelper.GetAdrByIp(operation.OperateIP); EnterRepository.GetRepositoryEnter().GetAdminOperationRepository.AddEntity(operation); }
/// <summary> /// 添加操作记录(不与数据库进行交互) /// </summary> /// <param name="actionType">操作动作类型(1:增,2:修改,3:查看,4:删除)</param> /// <param name="title">操作标题</param> /// <param name="content">操作内容</param> public static void AddOperation(int actionType, string title, string content) { AuthorDesign.Model.AdminOperation operation = new Model.AdminOperation() { Action = actionType, AdminId = WebCookieHelper.GetAdminId(0), AuthoryId = WebCookieHelper.GetAdminId(6), Content = content, CreateTime = DateTime.Now, IsSuperAdmin = (byte)WebCookieHelper.GetAdminId(5), Title = title, OperateIP = IpHelper.GetRealIP(), OperateInfo = IpHelper.GetBrowerVersion() }; operation.OperateAddress = IpHelper.GetAdrByIp(operation.OperateIP); EnterRepository.GetRepositoryEnter().GetAdminOperationRepository.AddEntity(operation); }