public void UpdateCase(string sourceAlias, string caseId, CaseUpdateEnum type, string filename, Stream file, AttachFileTypeEnum attachFileType, WorkstationResult result, string ContainerNum, string UserName, string CreateTime, L3.Cargo.Communications.Interfaces.CaseType caseType) { UpdateCaseMessage updateCaseMessage = new UpdateCaseMessage(caseId, type, caseType); if (type == CaseUpdateEnum.AttachFile) { updateCaseMessage.AttachFileType = attachFileType; updateCaseMessage.File = file; updateCaseMessage.Filename = filename; updateCaseMessage.UserName = UserName; } updateCaseMessage.WorkstationId = m_SysConfigMgrAccess.GetDefaultConfig().WorkstationAlias; updateCaseMessage.CaseId = caseId; updateCaseMessage.ObjectId = ContainerNum; updateCaseMessage.workstationResult = result; updateCaseMessage.Type = type; updateCaseMessage.CreateTime = CreateTime; updateCaseMessage.UserName = UserName; CaseSource <WSCommEndpoint> WSCommSource = FindSource <WSCommEndpoint>(sourceAlias); CaseSource <CaseRequestManagerEndpoint> ACSSource = FindSource <CaseRequestManagerEndpoint>(sourceAlias); if (default(CaseSource <WSCommEndpoint>) != WSCommSource) { try { WSCommSource.EndPoint.UpdateCase(updateCaseMessage); } catch (FaultException ex) { throw; } catch (Exception) { WSCommSource.EndPoint.Abort(); if (m_SysConfigMgrAccess.Contains(WSCommSource.Alias)) { m_SysConfigMgrAccess.Delete(WSCommSource.Alias); } m_WSCommSources.RemoveSource(WSCommSource); throw; } } else if (default(CaseSource <CaseRequestManagerEndpoint>) != ACSSource) { try { ACSSource.EndPoint.UpdateCase(updateCaseMessage); } catch (FaultException ex) { throw; } catch (Exception ex) { ACSSource.EndPoint.Abort(); if (m_SysConfigMgrAccess.Contains(ACSSource.Alias)) { m_SysConfigMgrAccess.Delete(ACSSource.Alias); } m_ACSSources.RemoveSource(ACSSource); throw; } } else { throw new Exception(ErrorMessages.SOURCE_NOT_AVAILABLE); } }
public void UpdateCase(String sourceAlias, String caseId, CaseUpdateEnum type, String filename, Stream file, AttachFileTypeEnum attachFileType, WorkstationResult result, String ContainerNum, String UserName, String CreateTime, L3.Cargo.Communications.Interfaces.CaseType caseType) { m_CaseSourceManager.UpdateCase(sourceAlias, caseId, type, filename, file, attachFileType, result, ContainerNum, UserName, CreateTime, caseType); }