public IssueTypeDS GetIssueCategorys(string agentNumber) { //Get issue categories IssueMgtServiceClient client = null; IssueTypeDS cats = null; try { cats = new IssueTypeDS(); client = new IssueMgtServiceClient(); IssueTypeDS _cats = client.GetIssueCategorys(); if (agentNumber == null) { cats.Merge(_cats); } else { cats.Merge(_cats.IssueTypeTable.Select("Category='Agent/Local'")); } client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetIssueCategorys() service error.", fe); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException("GetIssueCategorys() timeout error.", te); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException("GetIssueCategorys() communication error.", ce); } return(cats); }
public static IssueTypeDS GetIssueCategorys() { //Issue type category IssueTypeDS categorys = new IssueTypeDS(); try { _Client = new IssueMgtServiceClient(); categorys = _Client.GetIssueCategorys(); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetIssueCategorys() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetIssueCategorys() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetIssueCategorys() communication error.", ce); } return(categorys); }