Esempio n. 1
0
        public static void SetAccountExplorerNodeState(string nodeID, string nodeType, string nodeName, int?classificationID, bool expand)
        {
            try
            {
                using (_certonaService = new CertonaServiceClient())
                {
                    try
                    {
                        UserDTO user    = FormsAuthenticationWrapper.User;
                        var     nodeDTO = new NodeDTO
                        {
                            NodeID           = nodeID,
                            DisplayValue     = nodeName,
                            NodeType         = (NodeType)Enum.Parse(typeof(NodeType), nodeType),
                            ClassificationID = classificationID,
                            Expanded         = expand
                        };

                        var accountExplorerNodeStateRequest = new SetAccountExplorerNodeStateRequest
                        {
                            User = user,
                            Node = nodeDTO
                        };

                        _certonaService.SetAccountExplorerNodeState(accountExplorerNodeStateRequest);
                    }
                    catch (TimeoutException exception)
                    {
                        _certonaService.Abort();
                        throw;
                    }
                    catch (CommunicationException exception)
                    {
                        _certonaService.Abort();
                        throw;
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }