Beispiel #1
0
        public bool AddAction(Action action)
        {
            //Add a new action to an existing issue
            bool             added  = false;
            CRMServiceClient client = new CRMServiceClient();

            try {
                added = client.AddAction(action);
                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(added);
        }
Beispiel #2
0
        public static bool AddAction(Action action)
        {
            //Add an action to an existing issue
            bool             res    = false;
            CRMServiceClient client = null;

            try {
                //Call service
                client = new CRMServiceClient();
                res    = client.AddAction(action);
                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(res);
        }