public override void Execute(CommandContext context) { string itemId; Assert.ArgumentNotNull(context, nameof(context)); if (context.Items.Length > 0) { itemId = context.Items[0].ID.ToString(); } else { itemId = context.Parameters["id"]; } try { var records = Task.Run(async() => await FunctionRequests.GetItemHistory(itemId)).Result; SheerResponse.ShowPopup("itemhistory", "center", ItemAuditHtmlBuilder.SmallAuditView(records)); } catch (Exception e) { SheerResponse.Alert("Could not retrieve item history: " + e.Message, false); } }
public static void StoreRecord(AuditRecord record) { if (IgnoreScheduledEvents && IsScheduledEvent(record)) { return; } FunctionRequests.SendEventData(record); }