コード例 #1
0
        public override Response Execute()
        {
            var response = new Response()
            {
                Success = true, Message = ""
            };

            try
            {
                var sqlQueryHelper      = new SqlQueryHelper();
                var workspaceArtifactId = Helper.GetActiveCaseID();
                var eddsDbContext       = Helper.GetDBContext(-1);
                var workspaceDbContext  = Helper.GetDBContext(workspaceArtifactId);
                var tempTableName       = TempTableNameWithParentArtifactsToDelete;
                var textExtractorSetJob = new TextExtractorSetJob(eddsDbContext, workspaceDbContext, sqlQueryHelper, tempTableName);

                response = textExtractorSetJob.ExecutePreMassDelete();
            }
            catch (Exception ex)
            {
                response.Success   = false;
                response.Exception = new SystemException("Pre Mass Delete Failure: " + ex.Message);
            }

            return(response);
        }
コード例 #2
0
        public override Response Execute()
        {
            var response = new Response()
            {
                Success = true, Message = ""
            };

            try
            {
                var sqlQueryHelper      = new SqlQueryHelper();
                var workspaceArtifactId = Helper.GetActiveCaseID();
                var workspaceDbContext  = Helper.GetDBContext(workspaceArtifactId);
                var activeArtifactId    = ActiveArtifact.ArtifactID;

                var textExtractorSetJob = new TextExtractorSetJob(workspaceDbContext, sqlQueryHelper, activeArtifactId);
                response = textExtractorSetJob.ExecutePreDelete();
            }
            catch (Exception ex)
            {
                response.Success   = false;
                response.Exception = new SystemException("Pre Delete Failure: " + ex.Message);
            }

            return(response);
        }
コード例 #3
0
        public override Response Execute()
        {
            var response = new Response()
            {
                Message = string.Empty, Success = true
            };
            var layoutArtifactIdByGuid = GetArtifactIdByGuid(Constant.Guids.Layout.ExtractorSet);
            var layoutArtifactId       = ActiveLayout.ArtifactID;
            var validator = new Validator();

            //check if this is the Text Extractor Set layout
            if (!validator.VerifyIfNotLayout(layoutArtifactIdByGuid, layoutArtifactId))
            {
                //check if this is a new Text Extractor Set record
                if (!ActiveArtifact.IsNew)
                {
                    var sqlQueryHelper      = new SqlQueryHelper();
                    var eddsDbContext       = Helper.GetDBContext(-1);
                    var activeArtifactId    = ActiveArtifact.ArtifactID;
                    var textExtractorSetJob = new TextExtractorSetJob(eddsDbContext, sqlQueryHelper, activeArtifactId);

                    response = textExtractorSetJob.ExecutePreSave();
                }
            }

            return(response);
        }
コード例 #4
0
        public override Response Execute()
        {
            var response = new Response()
            {
                Success = true, Message = ""
            };

            try
            {
                var textExtractorSetJob = new TextExtractorSetJob();
                response = textExtractorSetJob.ExecutePreCascadeDelete();
            }
            catch (Exception ex)
            {
                response.Success   = false;
                response.Exception = new SystemException("Pre Cascade Delete Failure: " + ex.Message);
            }

            return(response);
        }