Exemplo n.º 1
0
        public DKPLocatorResponse Execute(FolderLocatorInTreeRequest request, IXExecutionContext context)
        {
            DKPLocatorResponse   response = new DKPLocatorResponse();
            DKPTreeObjectLocator locator  = new DKPTreeObjectLocator();
            XTreePath            path;

            if (request.FolderExID != null)
            {
                path = locator.GetFolderFullPath(context.Connection, request.FolderExID);
            }
            else
            {
                path = locator.GetFolderFullPath(context.Connection, request.FolderOID);
            }

            response.Path = path.ToString();
            if (path.Length > 0)
            {
                response.ObjectID = request.FolderOID;
            }
            return(response);
        }
Exemplo n.º 2
0
        public DKPLocatorResponse Execute(ContractLocatorInTreeRequest request, IXExecutionContext context)
        {
            DKPTreeObjectLocator locator  = new DKPTreeObjectLocator();
            DKPLocatorResponse   response = new DKPLocatorResponse();
            XTreePath            path;

            if (request.ContractOID == Guid.Empty)
            {
                path = locator.GetContractFullPath(context.Connection, request.ExternalID);
            }
            else
            {
                path = locator.GetIncidentFullPath(context.Connection, request.ContractOID);
            }

            response.Path = path.ToString();
            if (path.Length > 0)
            {
                response.ObjectID = path[0].ObjectID;
            }

            return(response);
        }