public LTLConsignee ReadLTLConsignee(int consigneeID) { LTLConsignee consignee = new LTLConsignee(); LTLClientServiceClient client = new LTLClientServiceClient(); try { consignee = client.ReadLTLConsignee(consigneeID); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> dfe) { client.Abort(); throw new ApplicationException(dfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(consignee); }
public LTLShipper ReadLTLShipper(int shipperID) { LTLShipper shipper = new LTLShipper(); LTLClientServiceClient client = new LTLClientServiceClient(); try { shipper = client.ReadLTLShipper(shipperID); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> dfe) { client.Abort(); throw new ApplicationException(dfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(shipper); }
public LTLClient ReadLTLClient(int clientID) { LTLClient ltlClient = new LTLClient(); LTLClientServiceClient client = new LTLClientServiceClient(); try { ltlClient = client.ReadLTLClient(clientID); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> dfe) { client.Abort(); throw new ApplicationException(dfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(ltlClient); }
public LTLConsigneeDataset ReadLTLConsigneesList(int clientID) { LTLConsigneeDataset consignees = new LTLConsigneeDataset(); LTLClientServiceClient client = new LTLClientServiceClient(); try { DataSet ds = client.ReadLTLConsigneesList(clientID); if (ds != null && ds.Tables["LTLConsigneeTable"].Rows.Count > 0) { consignees.Merge(ds); } client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> dfe) { client.Abort(); throw new ApplicationException(dfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(consignees); }
public LTLShipperDataset ViewLTLShippers(int clientID) { LTLShipperDataset shippers = new LTLShipperDataset(); LTLClientServiceClient client = new LTLClientServiceClient(); try { DataSet ds = client.ViewLTLShippersForClient(clientID); if (ds != null && ds.Tables["LTLShipperTable"].Rows.Count > 0) { shippers.Merge(ds); } client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> dfe) { client.Abort(); throw new ApplicationException(dfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(shippers); }