Ejemplo n.º 1
0
 public static void Write (DateTime dateTimeUtc, int actingPersonId, PWLogItem affectedItem,
                           int affectedItemId,
                           PWLogAction actionType, string actionDescription, string comment,
                           string changedField, string valueBefore, string valueAfter)
 {
     SwarmDb.GetDatabaseForWriting().CreatePWLogEntry(dateTimeUtc, actingPersonId, affectedItem.ToString(),
                                                        affectedItemId, actionType.ToString(), actionDescription,
                                                        changedField, valueBefore, valueAfter, comment, GetCurrentIp());
 }
Ejemplo n.º 2
0
        public static BasicPWLog[] GetLatestEvents(PWLogItem affectedItemType, DateTime beforeDate, int[] affectedIds, PWLogAction[] actionTypes)
        {
            List <string> actionTypeList = new List <string>();

            foreach (var at in actionTypes)
            {
                actionTypeList.Add(at.ToString());
            }

            return(SwarmDb.GetDatabaseForReading().GetLatestEvents(affectedItemType.ToString(), beforeDate, affectedIds, actionTypeList.ToArray()));
        }
Ejemplo n.º 3
0
        private static string hostIp = ""; //Used in batch programs

        public static void Write(DateTime dateTimeUtc, int actingPersonId, PWLogItem affectedItem,
                                 int affectedItemId,
                                 PWLogAction actionType, string actionDescription, string comment,
                                 string changedField, string valueBefore, string valueAfter)
        {
            SwarmDb.GetDatabaseForWriting().CreatePWLogEntry(dateTimeUtc, actingPersonId, affectedItem.ToString(),
                                                             affectedItemId, actionType.ToString(), actionDescription,
                                                             changedField, valueBefore, valueAfter, comment, GetCurrentIp());
        }
Ejemplo n.º 4
0
 public static DateTime CheckLatest(PWLogItem affectedItemType, int affectedItemId, PWLogAction actionType)
 {
     return(SwarmDb.GetDatabaseForReading()
            .CheckLogEntry(affectedItemType.ToString(), affectedItemId, actionType.ToString()));
 }
Ejemplo n.º 5
0
        public static BasicPWLog[] GetLatestEvents (PWLogItem affectedItemType, DateTime beforeDate, int[] affectedIds, PWLogAction[] actionTypes)
        {

            List<string> actionTypeList = new List<string>();
            foreach (var at in actionTypes)
                actionTypeList.Add(at.ToString());

            return SwarmDb.GetDatabaseForReading().GetLatestEvents(affectedItemType.ToString(), beforeDate, affectedIds, actionTypeList.ToArray());
        }
Ejemplo n.º 6
0
 public static DateTime CheckLatest (PWLogItem affectedItemType, int affectedItemId, PWLogAction actionType)
 {
     return SwarmDb.GetDatabaseForReading().CheckLogEntry(affectedItemType.ToString(), affectedItemId, actionType.ToString());
 }