Ejemplo n.º 1
0
 private void ObjectSpace_ObjectDeleted(object sender, ObjectsManipulatingEventArgs e)
 {
     if (JobScheduler != null)
     {
         e.Objects.OfType <DashboardDataExtract>().ForEach(de => JobScheduler.RemoveDataExtractCreationJob(de));
     }
 }
 private void ObjectSpaceOnObjectDeleted(object sender, ObjectsManipulatingEventArgs e)
 {
     foreach (var obj in e.Objects)
     {
         EntityScriptUtil.RunScriptsFor(obj, WhenToRun.OnDeleted, sender as IObjectSpace);
     }
 }
Ejemplo n.º 3
0
 private void ObjectSpace_ObjectDeleted(object sender, ObjectsManipulatingEventArgs e)
 {
     if (JobScheduler != null)
     {
         foreach (var extract in e.Objects.OfType <DashboardDataExtract>())
         {
             JobScheduler.RemoveDataExtractCreationJob(extract);
         }
     }
 }
Ejemplo n.º 4
0
 private void ObjectSpace_OnObjectDeleting(object sender, ObjectsManipulatingEventArgs e)
 {
     foreach (var o in e.Objects)
     {
         var count = ((XPObjectSpace)ObjectSpace).Session.CollectReferencingObjects(o).Count;
         if (count > 0)
         {
             var result = Validator.RuleSet.NewRuleSetValidationMessageResult(ObjectSpace, "Cannot be deleted " + count + " references found", DefaultContexts.Delete, View.CurrentObject, View.ObjectTypeInfo.Type);
             throw new ValidationException(result);
         }
     }
 }
Ejemplo n.º 5
0
 private void ObjectSpace_OnObjectDeleting(object sender, ObjectsManipulatingEventArgs e)
 {
     foreach (var o in e.Objects)
     {
         var count = ((XPObjectSpace)ObjectSpace).Session.CollectReferencingObjects(o).Count;
         if (count > 0)
         {
             var result          = new RuleSetValidationResult();
             var messageTemplate = "Cannot be deleted " + count + " references found";
             result.AddResult(new RuleSetValidationResultItem(o, ContextIdentifier.Delete, null,
                                                              new RuleValidationResult(null, this, ValidationState.Invalid,
                                                                                       messageTemplate)));
             throw new ValidationException(messageTemplate, result);
         }
     }
 }
Ejemplo n.º 6
0
 private void ObjectSpace_OnObjectDeleting(object sender, ObjectsManipulatingEventArgs e)
 {
     foreach (var o in e.Objects)
     {
         var count = ObjectSpace.Session.CollectReferencingObjects(o).Count;
         if (count > 0)
         {
             var result = new RuleSetValidationResult();
             var messageTemplate = "Cannot be deleted " + count + " referemces found";
             result.AddResult(new RuleSetValidationResultItem(o, ContextIdentifier.Delete, null,
                                                              new RuleValidationResult(null, this, false,
                                                                                       messageTemplate)));
             throw new ValidationException(messageTemplate, result);
         }    
     }
     
 }
Ejemplo n.º 7
0
 private void ObjectSpaceOnObjectDeleted(object sender, ObjectsManipulatingEventArgs args)
 {
     ModelArtifactStateModule.CollectRules(Application);
 }
Ejemplo n.º 8
0
 void ObjectSpaceOnObjectDeleting(object sender, ObjectsManipulatingEventArgs objectsManipulatingEventArgs)
 {
     _jobDetailsToBeDeleted.AddRange(objectsManipulatingEventArgs.Objects.OfType <IXpandJobDetail>().Select(detail => Scheduler.GetJobDetail(detail)).Where(jobDetail => jobDetail != null));
 }
Ejemplo n.º 9
0
        private void ObjectSpaceOnObjectDeleting(object sender, ObjectsManipulatingEventArgs e)
        {
            var objectSpace = ((IObjectSpace)sender);

            _deletedObjectKeys = e.Objects.Cast <object>().ToDictionary(o => objectSpace.GetKeyValue(o), o => o.GetType().GetITypeInfo());
        }
Ejemplo n.º 10
0
 private void ObjectSpaceOnObjectDeleted(object sender, ObjectsManipulatingEventArgs e)
 {
     _toObjectSpace.Delete(_deletedObjectKeys.Select(o => _toObjectSpace.GetObjectByKey(o.GetType(), o)));
     _toObjectSpace.CommitChanges();
 }
Ejemplo n.º 11
0
 void ObjectSpaceOnObjectDeleting(object sender, ObjectsManipulatingEventArgs objectsManipulatingEventArgs) {
     supportJobDetails.AddRange(objectsManipulatingEventArgs.Objects.OfType<ISupportSchedulerLink>().SelectMany(CreateJobDetailInfos()));
 }
Ejemplo n.º 12
0
 void ObjectSpaceOnObjectDeleting(object sender, ObjectsManipulatingEventArgs objectsManipulatingEventArgs)
 {
     supportJobDetails.AddRange(objectsManipulatingEventArgs.Objects.OfType <ISupportSchedulerLink>().SelectMany(CreateJobDetailInfos()));
 }
Ejemplo n.º 13
0
 void ObjectSpaceOnObjectDeleting(object sender, ObjectsManipulatingEventArgs objectsManipulatingEventArgs) {
     _jobDetailsToBeDeleted.AddRange(objectsManipulatingEventArgs.Objects.OfType<IXpandJobDetail>().Select(detail => Scheduler.GetJobDetail(detail)).Where(jobDetail => jobDetail != null));
 }
 void ObjectSpaceOnObjectDeleted(object sender, ObjectsManipulatingEventArgs args) {
     CollectRules();
 }
Ejemplo n.º 15
0
 void ObjectSpaceOnObjectDeleted(object sender, ObjectsManipulatingEventArgs args)
 {
     CollectRules();
 }
 private void ObjectSpaceOnObjectDeleted(object sender, ObjectsManipulatingEventArgs args){
     ModelArtifactStateModule.CollectRules(Application);
 }