public static LTLQuote2 CreateQuoteForSalesRep(LTLQuote2 quote) { //Create a new LTL Quote LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { quote = client.CreateQuoteForSalesRep(quote); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(quote); }
public static LoadTender GetLoadTender(int number) { //Get an existing file attachment from database LoadTender loadTender = null; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { loadTender = client.GetLoadTender(number); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(loadTender); }
public static bool ChangeOwnerLoadTenderQuote(int quoteID, string owner) { //Change the owner of an existing LTLLoadTenderQuote bool result = false; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { result = client.ChangeOwnerLoadTenderQuote(quoteID, owner); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(result); }
public static bool CancelLoadTenderQuote(int quoteID, DateTime cancelled, string cancelledBy) { //Cancel an existing LTLLoadTenderQuote bool result = false; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { result = client.CancelLoadTenderQuote(quoteID, cancelled, cancelledBy); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(result); }
public static bool BookLoadTenderQuote(int quoteID, LTLShipment2 shipment) { //Book an existing LTLLoadTenderQuote bool result = false; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { result = client.BookLoadTenderQuote(quoteID, shipment); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(result); }
public static bool UpdateLoadTenderQuote(LTLLoadTenderQuote quote) { //Update an existing LTLLoadTenderQuote bool updated = false; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { updated = client.UpdateLoadTenderQuote(quote); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(updated); }
public static LTLLoadTenderQuote ReadLoadTenderQuote(int id) { // LTLLoadTenderQuote quote = null; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { quote = client.ReadLoadTenderQuote(id); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(quote); }
public static int CreateLoadTenderQuote(LTLLoadTenderQuote quote) { //Create a new LTLLoadTenderQuote int id = 0; LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { id = client.CreateLoadTenderQuote(quote); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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); }
public static LoadTenderQuoteDataset ViewLoadTenderQuotes(string owner) { // LoadTenderQuoteDataset quotes = new LoadTenderQuoteDataset(); LTLLoadTenderService2Client client = new LTLLoadTenderService2Client(); try { DataSet ds = client.ViewLoadTenderQuotes(owner); if (ds != null) { quotes.Merge(ds); } client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <LTLFault> 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(quotes); }