コード例 #1
0
 public void DeleteOriginalData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <UserTaskCollection>("UserTasks", tasks =>
     {
         UserTaskAdapter.Instance.DeleteUserTasks(tasks);
     });
 }
コード例 #2
0
 public void DeleteOriginalData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <GenericOpinionCollection>("Opinions", opinions =>
     {
         opinions.ForEach(o => GenericOpinionAdapter.Instance.Delete(o));
     });
 }
コード例 #3
0
 public void DeleteOriginalData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <UserOperationLogCollection>("UserOperationLogs", logs =>
     {
         UserOperationLogAdapter.Instance.Delete(b => b.AppendItem("RESOURCE_ID", info.ResourceID));
     });
 }
コード例 #4
0
 public void DeleteOriginalData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <WfAclItemCollection>("Acl", acl =>
     {
         WfAclAdapter.Instance.Delete(b => b.AppendItem("RESOURCE_ID", info.ResourceID));
     });
 }
コード例 #5
0
        public void LoadOriginalData(ArchiveBasicInfo info)
        {
            MaterialList materials = MaterialAdapter.Instance.LoadMaterialsByResourceID(info.ResourceID);

            info.Context["Materials"] = materials;

            materials.ForEach(m => m.EnsureMaterialContent());
        }
コード例 #6
0
 private void InnerDelete(ArchiveBasicInfo info)
 {
     using (TransactionScope scope = TransactionScopeFactory.Create())
     {
         DeleteOriginalData(info);
         scope.Complete();
     }
 }
コード例 #7
0
        public void LoadOriginalData(ArchiveBasicInfo info)
        {
            //暂时不处理已办

            /*
             * info.Context["UserAccomplishedTasks"] =
             *      UserTaskAdapter.Instance.GetUserAccomplishedTasks(UserTaskIDType.ResourceID, UserTaskFieldDefine.All, false, info.ResourceID);
             */
        }
コード例 #8
0
        public void SaveArchiveData(ArchiveBasicInfo info)
        {
            info.Context.DoAction <UserOperationLogCollection>("UserOperationLogs", logs =>
            {
                UserOperationLogAdapter.Instance.Delete(b => b.AppendItem("RESOURCE_ID", info.ResourceID));

                logs.ForEach(log => UserOperationLogAdapter.Instance.Update(log));
            });
        }
コード例 #9
0
        public void DeleteOriginalData(ArchiveBasicInfo info)
        {
            ArchiveSettings settings = ArchiveSettings.GetConfig();

            info.Context.DoAction <MaterialList>("Materials", materials =>
            {
                MaterialAdapter.Instance.DeleteMaterialsByResourceID(info.ResourceID);
                MaterialContentAdapter.Instance.Delete(b => b.AppendItem("RELATIVE_ID", info.ResourceID));
            });
        }
コード例 #10
0
 public void DeleteOriginalData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <GenericFormData>("FormData", data =>
     {
         if (data != null)
         {
             GenericFormDataAdapter.Instance.Delete(data);
         }
     });
 }
コード例 #11
0
 public void DeleteOriginalData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <AppCommonInfo>("AppCommonInfo", acic =>
     {
         if (acic != null)
         {
             AppCommonInfoAdapter.Instance.Delete(acic);
         }
     });
 }
コード例 #12
0
 public void SaveArchiveData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <GenericFormData>("FormData", data =>
     {
         if (data != null)
         {
             GenericFormDataAdapter.Instance.Update(data);
         }
     });
 }
コード例 #13
0
        public void DeleteOriginalData(ArchiveBasicInfo info)
        {
            //暂时不处理已办

            /*
             * info.Context.DoAction<UserTaskCollection>("UserAccomplishedTasks", uc =>
             * {
             *      UserTaskAdapter.Instance.DeleteUserAccomplishedTasks(uc);
             * });
             */
        }
コード例 #14
0
 public void SaveArchiveData(ArchiveBasicInfo info)
 {
     info.Context.DoAction <Dictionary <string, WfProcessDataPack> >("ProcessDataDict", processesDict =>
     {
         foreach (KeyValuePair <string, WfProcessDataPack> kp in processesDict)
         {
             WfProcessInstanceDataAdapter.Instance.Update(kp.Value.ProcessData);
             WfProcessCurrentActivityAdapter.Instance.Update(kp.Key, kp.Value.ActivitiesData);
             WfProcessCurrentAssigneeAdapter.Instance.Update(kp.Key, kp.Value.AssigneesData);
             WfProcessRelativeParamsAdapter.Instance.Update(kp.Key, kp.Value.ProcessRelativeParams);
             WfRelativeProcessAdapter.Instance.Update(kp.Key, kp.Value.RelativeProcessesData);
         }
     });
 }
コード例 #15
0
        protected override void LoadOriginalData(ArchiveBasicInfo info)
        {
            WorkflowArchiveOperation.Instance.LoadOriginalData(info);

            GenericOpinionArchiveOperation.Instance.LoadOriginalData(info);
            MaterialArchiveOperation.Instance.LoadOriginalData(info);

            AppCommonInfoArchiveOperation.Instance.LoadOriginalData(info);

            AclArchiveOperation.Instance.LoadOriginalData(info);

            UserAccomplishedTaskArchiveOperation.Instance.LoadOriginalData(info);
            UserOpLogArchiveOperation.Instance.LoadOriginalData(info);

            UserTaskArchiveOperation.Instance.LoadOriginalData(info);
        }
コード例 #16
0
        public void Archive(ArchiveBasicInfo info)
        {
            LoadOriginalData(info);

            using (DbConnectionMappingContext context =
                       DbConnectionMappingContext.CreateMapping(ConnectionDefine.DBConnectionName, "Archive"))
            {
                using (TransactionScope scope = TransactionScopeFactory.Create())
                {
                    SaveArchiveData(info);
                    scope.Complete();
                }
            }

            if (ArchiveSettings.GetConfig().DeleteOriginalData)
            {
                InnerDelete(info);
            }
        }
コード例 #17
0
        public void SaveArchiveData(ArchiveBasicInfo info)
        {
            ORMappingItemCollection mappings = ORMapping.GetMappingInfo <GenericOpinion>().Clone();

            mappings["ISSUE_DATETIME"].BindingFlags  |= (ClauseBindingFlags.Update | ClauseBindingFlags.Insert);
            mappings["APPEND_DATETIME"].BindingFlags |= (ClauseBindingFlags.Update | ClauseBindingFlags.Insert);
            ORMappingContextCache.Instance[typeof(GenericOpinion)] = mappings;

            try
            {
                info.Context.DoAction <GenericOpinionCollection>("Opinions", opinions =>
                {
                    opinions.ForEach(o => GenericOpinionAdapter.Instance.Update(o));
                });
            }
            finally
            {
                ORMappingContextCache.Instance.Remove(typeof(GenericOpinion));
            }
        }
コード例 #18
0
        public void SaveArchiveData(ArchiveBasicInfo info)
        {
            //暂时不处理已办

            /*
             * ORMappingItemCollection mappings = ORMapping.GetMappingInfo<UserTask>().Clone();
             *
             * mappings["COMPLETED_TIME"].BindingFlags |= (ClauseBindingFlags.Update | ClauseBindingFlags.Insert);
             * ORMappingContextCache.Instance[typeof(UserTask)] = mappings;
             *
             * try
             * {
             *      info.Context.DoAction<UserTaskCollection>("UserAccomplishedTasks", uc =>
             *      {
             *              //UserTaskAdapter.Instance.SaveUserAccomplishedTasks(uc);
             *      });
             * }
             * finally
             * {
             *      ORMappingContextCache.Instance.Remove(typeof(UserTask));
             * }*/
        }
コード例 #19
0
        public void LoadOriginalData(ArchiveBasicInfo info)
        {
            WfProcessInstanceDataCollection processesData = WfProcessInstanceDataAdapter.Instance.LoadByResourceID(info.ResourceID);

            Dictionary <string, WfProcessDataPack> processesDict = new Dictionary <string, WfProcessDataPack>();

            foreach (WfProcessInstanceData processData in processesData)
            {
                WfProcessDataPack dataPack = new WfProcessDataPack();

                dataPack.ProcessData = processData;

                dataPack.ActivitiesData        = WfProcessCurrentActivityAdapter.Instance.Load(processData.InstanceID);
                dataPack.AssigneesData         = WfProcessCurrentAssigneeAdapter.Instance.Load(processData.InstanceID);
                dataPack.ProcessRelativeParams = WfProcessRelativeParamsAdapter.Instance.Load(processData.InstanceID);
                dataPack.RelativeProcessesData = WfRelativeProcessAdapter.Instance.Load(processData.InstanceID);

                processesDict.Add(processData.InstanceID, dataPack);
            }

            info.Context["ProcessDataDict"] = processesDict;
        }
コード例 #20
0
        public void SaveArchiveData(ArchiveBasicInfo info)
        {
            ArchiveSettings settings = ArchiveSettings.GetConfig();

            ORMappingItemCollection mappings = ORMapping.GetMappingInfo <Material>().Clone();

            mappings["CREATE_DATETIME"].BindingFlags        |= (ClauseBindingFlags.Update | ClauseBindingFlags.Insert);
            ORMappingContextCache.Instance[typeof(Material)] = mappings;

            try
            {
                MaterialAdapter.Instance.DeleteMaterialsByResourceID(info.ResourceID);
                MaterialContentAdapter.Instance.Delete(b => b.AppendItem("RELATIVE_ID", info.ResourceID));

                info.Context.DoAction <MaterialList>("Materials", materials =>
                {
                    DeltaMaterialList dml = new DeltaMaterialList();

                    materials.ForEach(m =>
                    {
                        dml.Inserted.Add(m);
                    });

                    MaterialAdapter.Instance.SaveDeltaMaterials(dml, false);

                    dml.Inserted.ForEach(m =>
                    {
                        if (m.Content != null)
                        {
                            MaterialContentAdapter.Instance.Update(m.Content);
                        }
                    });
                });
            }
            finally
            {
                ORMappingContextCache.Instance.Remove(typeof(Material));
            }
        }
コード例 #21
0
        public void SaveArchiveData(ArchiveBasicInfo info)
        {
            ORMappingItemCollection mappings = ORMapping.GetMappingInfo <AppCommonInfo>().Clone();

            mappings["CREATE_TIME"].BindingFlags |= (ClauseBindingFlags.Update | ClauseBindingFlags.Insert);
            ORMappingContextCache.Instance[typeof(AppCommonInfo)] = mappings;

            try
            {
                info.Context.DoAction <AppCommonInfo>("AppCommonInfo", acic =>
                {
                    if (acic != null)
                    {
                        acic.Status = ArchiveStatus.Archived;
                        AppCommonInfoAdapter.Instance.Update(acic);
                    }
                });
            }
            finally
            {
                ORMappingContextCache.Instance.Remove(typeof(AppCommonInfo));
            }
        }
コード例 #22
0
 public void LoadOriginalData(ArchiveBasicInfo info)
 {
     info.Context["Acl"] = WfAclAdapter.Instance.LoadByResourceID(info.ResourceID);
 }
コード例 #23
0
 protected virtual void DeleteOriginalData(ArchiveBasicInfo info)
 {
     WorkflowArchiveOperation.Instance.DeleteOriginalData(info);
 }
コード例 #24
0
 public void LoadOriginalData(ArchiveBasicInfo info)
 {
     info.Context["FormData"] = GenericFormDataAdapter.Instance.Load(info.ResourceID, false);
 }
コード例 #25
0
 public IArchiveExecutor GetArchiveExecutor(ArchiveBasicInfo info)
 {
     return(BasicFormDataArchiveExecutor.Instance);
 }
コード例 #26
0
        protected override void SaveArchiveData(ArchiveBasicInfo info)
        {
            FormDataArchiveDataOperation.Instance.SaveArchiveData(info);

            base.SaveArchiveData(info);
        }
コード例 #27
0
 public void LoadOriginalData(ArchiveBasicInfo info)
 {
     info.Context["UserOperationLogs"] =
         UserOperationLogAdapter.Instance.LoadByResourceID(info.ResourceID);
 }
コード例 #28
0
        protected override void DeleteOriginalData(ArchiveBasicInfo info)
        {
            FormDataArchiveDataOperation.Instance.DeleteOriginalData(info);

            base.DeleteOriginalData(info);
        }
コード例 #29
0
 public void LoadOriginalData(ArchiveBasicInfo info)
 {
     info.Context["UserTasks"] = UserTaskAdapter.Instance.LoadUserTasks(b => b.AppendItem("RESOURCE_ID", info.ResourceID));
 }
コード例 #30
0
 public void SaveArchiveData(ArchiveBasicInfo info)
 {
 }