Exemplo n.º 1
0
 public static void Write (Person actingPerson, PWLogItem affectedItem, int affectedItemId,
                           PWLogAction actionType,
                           string actionDescription, string comment)
 {
     Write(DateTime.UtcNow, actingPerson.Identity, affectedItem, affectedItemId, actionType,
            actionDescription, comment, string.Empty, string.Empty, string.Empty);
 }
Exemplo n.º 2
0
 public static void Write(Person actingPerson, PWLogItem affectedItem, int affectedItemId,
                          PWLogAction actionType,
                          string actionDescription, string comment)
 {
     Write(DateTime.UtcNow, actingPerson.Identity, affectedItem, affectedItemId, actionType,
           actionDescription, comment, string.Empty, string.Empty, string.Empty);
 }
Exemplo n.º 3
0
 public static void Write(Person actingPerson, PWLogItem affectedItem, int affectedItemId,
                          PWLogAction actionType,
                          string actionDescription, string comment, string changedField, string valueBefore,
                          string valueAfter)
 {
     Write(DateTime.UtcNow, actingPerson.Identity, affectedItem, affectedItemId, actionType,
           actionDescription, comment, changedField, valueBefore, valueAfter);
 }
Exemplo n.º 4
0
 public static void Write (Person actingPerson, PWLogItem affectedItem, int affectedItemId,
                           PWLogAction actionType,
                           string actionDescription, string comment, string changedField, string valueBefore,
                           string valueAfter)
 {
     Write(DateTime.UtcNow, actingPerson.Identity, affectedItem, affectedItemId, actionType,
            actionDescription, comment, changedField, valueBefore, valueAfter);
 }
Exemplo n.º 5
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());
        }
Exemplo n.º 6
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());
 }
Exemplo n.º 7
0
 public static void Write(int actingPersonId, PWLogItem affectedItem, int affectedItemId,
                          PWLogAction actionType,
                          string actionDescription, string comment)
 {
     if (actingPersonId > 0 && comment == "")
     {
         try
         {
             comment = "Action done by " + Person.FromIdentity(actingPersonId).Name;
         }
         catch { }
     }
     Write(DateTime.UtcNow, actingPersonId, affectedItem, affectedItemId, actionType,
           actionDescription, comment, string.Empty, string.Empty, string.Empty);
 }
Exemplo n.º 8
0
 public static void Write (int actingPersonId, PWLogItem affectedItem, int affectedItemId,
                           PWLogAction actionType,
                           string actionDescription, string comment)
 {
     if (actingPersonId > 0 && comment == "")
     {
         try
         {
             comment = "Action done by " + Person.FromIdentity(actingPersonId).Name;
         }
         catch { }
     }
     Write(DateTime.UtcNow, actingPersonId, affectedItem, affectedItemId, actionType,
            actionDescription, comment, string.Empty, string.Empty, string.Empty);
 }
Exemplo n.º 9
0
 public static DateTime CheckLatest(PWLogItem affectedItemType, int affectedItemId, PWLogAction actionType)
 {
     return(SwarmDb.GetDatabaseForReading()
            .CheckLogEntry(affectedItemType.ToString(), affectedItemId, actionType.ToString()));
 }
Exemplo n.º 10
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());
        }
Exemplo n.º 11
0
 public static DateTime CheckLatest (PWLogItem affectedItemType, int affectedItemId, PWLogAction actionType)
 {
     return SwarmDb.GetDatabaseForReading().CheckLogEntry(affectedItemType.ToString(), affectedItemId, actionType.ToString());
 }