internal static void ExecutePostDeleteManyToManyRelationHook(string relationName, Guid?originId, Guid?targetId) { if (string.IsNullOrWhiteSpace(relationName)) { throw new ArgumentException("relationName"); } List <IErpPostDeleteManyToManyRelationHook> hookedInstances = HookManager.GetHookedInstances <IErpPostDeleteManyToManyRelationHook>(relationName); foreach (var inst in hookedInstances) { inst.OnPostDelete(relationName, originId, targetId); } }
internal static void ExecutePostUpdateRecordHooks(string entityName, EntityRecord record) { if (string.IsNullOrWhiteSpace(entityName)) { throw new ArgumentException("entityName"); } List <IErpPostUpdateRecordHook> hookedInstances = HookManager.GetHookedInstances <IErpPostUpdateRecordHook>(entityName); foreach (var inst in hookedInstances) { inst.OnPostUpdateRecord(entityName, record); } }
internal static void ExecutePreDeleteRecordHooks(string entityName, EntityRecord record, List <ErrorModel> errors) { if (string.IsNullOrWhiteSpace(entityName)) { throw new ArgumentException("entityName"); } if (errors == null) { throw new ArgumentNullException("errors"); } List <IErpPreDeleteRecordHook> hookedInstances = HookManager.GetHookedInstances <IErpPreDeleteRecordHook>(entityName); foreach (var inst in hookedInstances) { inst.OnPreDeleteRecord(entityName, record, errors); } }
internal static void ExecutePreDeleteManyToManyRelationHook(string relationName, Guid?originId, Guid?targetId, List <ErrorModel> errors) { if (string.IsNullOrWhiteSpace(relationName)) { throw new ArgumentException("relationName"); } if (errors == null) { throw new ArgumentNullException("errors"); } List <IErpPreDeleteManyToManyRelationHook> hookedInstances = HookManager.GetHookedInstances <IErpPreDeleteManyToManyRelationHook>(relationName); foreach (var inst in hookedInstances) { inst.OnPreDelete(relationName, originId, targetId, errors); } }