Beispiel #1
0
        public IssueDS SearchIssues(string agentNumber, string searchText)
        {
            //Get issue search data
            IssueMgtServiceClient client = null;
            IssueDS issues = new IssueDS();

            try {
                if (searchText.Trim().Length > 0)
                {
                    client = new IssueMgtServiceClient();
                    if (agentNumber == null)
                    {
                        issues = client.SearchIssues(searchText);
                    }
                    else
                    {
                        issues = client.SearchIssuesForAgent(agentNumber, searchText);
                    }
                    client.Close();
                }
            }
            catch (FaultException fe) { throw new ApplicationException("SearchIssues() service error.", fe); }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException("SearchIssues() timeout error.", te); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException("SearchIssues() communication error.", ce); }
            return(issues);
        }
Beispiel #2
0
        public static IssueDS SearchIssues(string searchText)
        {
            //Get issue search data
            IssueDS search = new IssueDS();

            try {
                _Client = new IssueMgtServiceClient();
                search  = _Client.SearchIssues(searchText);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("SearchIssues() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("SearchIssues() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("SearchIssues() communication error.", ce); }
            return(search);
        }