示例#1
0
        public static Contact GetContact(int contactID)
        {
            //Get issue types
            Contact contact = null;

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