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

            try {
                client = new IssueMgtServiceClient();
                if (agentNumber == null)
                {
                    issues = client.GetIssues();
                }
                else
                {
                    issues = new IssueDS();
                    IssueDS _issues = client.GetIssues();
                    issues.Merge(_issues.IssueTable.Select("AgentNumber='" + agentNumber + "'"));
                    issues.Merge(_issues.IssueTable.Select("AgentNumber=''"));
                }
                client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetIssues() service error.", fe); }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException("GetIssues() timeout error.", te); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException("GetIssues() communication error.", ce); }
            return(issues);
        }
Beispiel #2
0
        public IssueDS GetIssues()
        {
            //Get issue search data
            IssueMgtServiceClient client = null;
            IssueDS issues = null;

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