EventDB.cs 869 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Aitex.Core.RT.Event
  6. {
  7. public class EventDB
  8. {
  9. const string Delete_Event = @"Delete from ""EventManager"" where ""OccurTime"" < '{0}' ";
  10. //public int DeleteEventData(int beforeMonth)
  11. //{
  12. // try
  13. // {
  14. // if (beforeMonth < 6) return -1;
  15. // string executeDelete = string.Format(Delete_Event, DateTime.Now.Subtract(new TimeSpan(beforeMonth*30,0,0,0)).ToString("yyyy-MM-dd HH:mm:ss.fff"));
  16. // int retCount = PostgresqlHelper.ExecuteNonQuery(executeDelete);
  17. // return retCount;
  18. // }
  19. // catch (Exception ex)
  20. // {
  21. // Logger.Write(ex);
  22. // return -1;
  23. // }
  24. //}
  25. }
  26. }