Esempio n. 1
0
        public IssueDS SearchIssuesAdvanced(string agentNumber, object[] criteria)
        {
            //Get issue search data
            IssueMgtServiceClient client = null;
            IssueDS issues = new IssueDS();

            try {
                client = new IssueMgtServiceClient();
                if (agentNumber == null)
                {
                    issues = client.SearchIssuesAdvanced(criteria);
                }
                else
                {
                    issues = client.SearchIssuesAdvancedForAgent(agentNumber, criteria);
                }
                client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("SearchIssuesAdvanced() service error.", fe); }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException("SearchIssuesAdvanced() timeout error.", te); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException("SearchIssuesAdvanced() communication error.", ce); }
            return(issues);
        }