Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public static void WriteOperationLog(Privilege privilege, string description)
 {
     OperationLogEntry entry2 = new OperationLogEntry();
     entry2.AddedTime = DateTime.Now;
     entry2.Privilege = privilege;
     entry2.Description = description;
     entry2.IpAddress = Globals.IPAddress;
     entry2.PageUrl = HiContext.Current.Context.Request.RawUrl;
     entry2.UserName = HiContext.Current.Context.User.Identity.Name;
     OperationLogEntry entry = entry2;
     StoreProvider.Instance().WriteOperationLogEntry(entry);
 }
Exemplo n.º 3
0
 public abstract void WriteOperationLogEntry(OperationLogEntry entry);
Exemplo n.º 4
0
 public void WriteOperationLogEntry(OperationLogEntry entry)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("INSERT INTO [Hishop_Logs]([PageUrl],[AddedTime],[UserName],[IPAddress],[Privilege],[Description]) VALUES(@PageUrl,@AddedTime,@UserName,@IPAddress,@Privilege,@Description)");
     this.database.AddInParameter(sqlStringCommand, "PageUrl", DbType.String, entry.PageUrl);
     this.database.AddInParameter(sqlStringCommand, "AddedTime", DbType.DateTime, entry.AddedTime);
     this.database.AddInParameter(sqlStringCommand, "UserName", DbType.String, entry.UserName);
     this.database.AddInParameter(sqlStringCommand, "IPAddress", DbType.String, entry.IpAddress);
     this.database.AddInParameter(sqlStringCommand, "Privilege", DbType.Int32, (int) entry.Privilege);
     this.database.AddInParameter(sqlStringCommand, "Description", DbType.String, entry.Description);
     this.database.ExecuteNonQuery(sqlStringCommand);
 }