コード例 #1
0
ファイル: CustomersGateway.cs プロジェクト: jpheary/Argix10
        public long CreateIssue(Issue issue)
        {
            //Create a new issue
            long             issueID = 0;
            CRMServiceClient client  = new CRMServiceClient();

            try {
                issueID = client.CreateIssue(issue);
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(issueID);
        }
コード例 #2
0
        public static long CreateIssue(Issue issue)
        {
            //
            long             id     = 0;
            CRMServiceClient client = null;

            try {
                client = new CRMServiceClient();
                id     = client.CreateIssue(issue);
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <CustomersFault> cfe) { client.Abort(); throw new ApplicationException(cfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(id);
        }