コード例 #1
0
        public static Drivers GetDrivers(string routeClass)
        {
            //
            Drivers drivers = null;

            try {
                _Client = new RoadshowServiceClient();
                drivers = _Client.GetDrivers(routeClass);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetDrivers() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetDrivers() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetDrivers() communication error.", ce); }
            return(drivers);
        }
コード例 #2
0
ファイル: TerminalGateway.cs プロジェクト: jpheary/Argix10
        public static Drivers GetDrivers(int depotNumber)
        {
            //Get drivers list
            Drivers drivers = null;
            RoadshowServiceClient client = new RoadshowServiceClient();

            try {
                drivers = client.GetDrivers(depotNumber);
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <RoadshowFault> rfe) { client.Abort(); throw new ApplicationException(rfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(drivers);
        }
コード例 #3
0
ファイル: RoadshowGateway.cs プロジェクト: jpheary/Argix10
        public static Drivers GetDrivers(int depotNumber)
        {
            //Get drivers list
            Drivers drivers = null;

            try {
                _Client = new RoadshowServiceClient();
                drivers = _Client.GetDrivers(depotNumber);
                _Client.Close();

                Driver driver = new Driver();
                driver.Name = "All";
                drivers.Insert(0, driver);
            }
            catch (FaultException fe) { throw new ApplicationException("GetDrivers() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetDrivers() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetDrivers() communication error.", ce); }
            return(drivers);
        }