Пример #1
0
        public static TLs GetAgentSummary(int terminalID)
        {
            //Get an agent summary view for the specified terminal
            TLs tls = null;

            try {
                _Client = new TLViewerServiceClient();
                tls     = _Client.GetAgentSummary(terminalID);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetAgentSummary() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetAgentSummary() timed out.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetAgentSummary() had a communication issue.", ce); }
            return(tls);
        }
Пример #2
0
        public TLs GetAgentSummary(int terminalID, string sortBy)
        {
            //Get an agent summary view for the specified terminal
            TLs tls = null;
            TLViewerServiceClient _Client = null;

            try {
                _Client = new TLViewerServiceClient();
                tls     = _Client.GetAgentSummary(terminalID);

                if (sortBy.Trim().Length == 0)
                {
                    sortBy = "AgentNumber";
                }
                TLComparer comparer = new TLComparer(sortBy);
                tls.Sort(comparer);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetAgentSummary() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetAgentSummary() timed out.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetAgentSummary() had a communication issue.", ce); }
            return(tls);
        }