public void DeleteOriginalData(ArchiveBasicInfo info) { info.Context.DoAction <UserTaskCollection>("UserTasks", tasks => { UserTaskAdapter.Instance.DeleteUserTasks(tasks); }); }
public void DeleteOriginalData(ArchiveBasicInfo info) { info.Context.DoAction <GenericOpinionCollection>("Opinions", opinions => { opinions.ForEach(o => GenericOpinionAdapter.Instance.Delete(o)); }); }
public void DeleteOriginalData(ArchiveBasicInfo info) { info.Context.DoAction <UserOperationLogCollection>("UserOperationLogs", logs => { UserOperationLogAdapter.Instance.Delete(b => b.AppendItem("RESOURCE_ID", info.ResourceID)); }); }
public void DeleteOriginalData(ArchiveBasicInfo info) { info.Context.DoAction <WfAclItemCollection>("Acl", acl => { WfAclAdapter.Instance.Delete(b => b.AppendItem("RESOURCE_ID", info.ResourceID)); }); }
public void LoadOriginalData(ArchiveBasicInfo info) { MaterialList materials = MaterialAdapter.Instance.LoadMaterialsByResourceID(info.ResourceID); info.Context["Materials"] = materials; materials.ForEach(m => m.EnsureMaterialContent()); }
private void InnerDelete(ArchiveBasicInfo info) { using (TransactionScope scope = TransactionScopeFactory.Create()) { DeleteOriginalData(info); scope.Complete(); } }
public void LoadOriginalData(ArchiveBasicInfo info) { //暂时不处理已办 /* * info.Context["UserAccomplishedTasks"] = * UserTaskAdapter.Instance.GetUserAccomplishedTasks(UserTaskIDType.ResourceID, UserTaskFieldDefine.All, false, info.ResourceID); */ }
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)); }); }
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)); }); }
public void DeleteOriginalData(ArchiveBasicInfo info) { info.Context.DoAction <GenericFormData>("FormData", data => { if (data != null) { GenericFormDataAdapter.Instance.Delete(data); } }); }
public void DeleteOriginalData(ArchiveBasicInfo info) { info.Context.DoAction <AppCommonInfo>("AppCommonInfo", acic => { if (acic != null) { AppCommonInfoAdapter.Instance.Delete(acic); } }); }
public void SaveArchiveData(ArchiveBasicInfo info) { info.Context.DoAction <GenericFormData>("FormData", data => { if (data != null) { GenericFormDataAdapter.Instance.Update(data); } }); }
public void DeleteOriginalData(ArchiveBasicInfo info) { //暂时不处理已办 /* * info.Context.DoAction<UserTaskCollection>("UserAccomplishedTasks", uc => * { * UserTaskAdapter.Instance.DeleteUserAccomplishedTasks(uc); * }); */ }
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); } }); }
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); }
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); } }
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)); } }
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)); * }*/ }
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; }
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)); } }
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)); } }
public void LoadOriginalData(ArchiveBasicInfo info) { info.Context["Acl"] = WfAclAdapter.Instance.LoadByResourceID(info.ResourceID); }
protected virtual void DeleteOriginalData(ArchiveBasicInfo info) { WorkflowArchiveOperation.Instance.DeleteOriginalData(info); }
public void LoadOriginalData(ArchiveBasicInfo info) { info.Context["FormData"] = GenericFormDataAdapter.Instance.Load(info.ResourceID, false); }
public IArchiveExecutor GetArchiveExecutor(ArchiveBasicInfo info) { return(BasicFormDataArchiveExecutor.Instance); }
protected override void SaveArchiveData(ArchiveBasicInfo info) { FormDataArchiveDataOperation.Instance.SaveArchiveData(info); base.SaveArchiveData(info); }
public void LoadOriginalData(ArchiveBasicInfo info) { info.Context["UserOperationLogs"] = UserOperationLogAdapter.Instance.LoadByResourceID(info.ResourceID); }
protected override void DeleteOriginalData(ArchiveBasicInfo info) { FormDataArchiveDataOperation.Instance.DeleteOriginalData(info); base.DeleteOriginalData(info); }
public void LoadOriginalData(ArchiveBasicInfo info) { info.Context["UserTasks"] = UserTaskAdapter.Instance.LoadUserTasks(b => b.AppendItem("RESOURCE_ID", info.ResourceID)); }
public void SaveArchiveData(ArchiveBasicInfo info) { }