//Interface public dlgLoadTenderQuote(LTLLoadTenderQuote quote) { //Constructor try { InitializeComponent(); this.mQuote = quote; } catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); } }
public bool UpdateLoadTenderQuote(LTLLoadTenderQuote quote) { //Update an existing LTLLoadTenderQuote bool updated = false; try { updated = new DataService().ExecuteNonQuery(SQL_CONNID, USP_LOADTENDERQUOTE_UPDATE, new object[] { quote.ID, quote.BrokerName, quote.ContactName, quote.ContactPhone, quote.ContactEmail, quote.Description, quote.Comments, quote.LTLQuote.PalletRate, quote.LTLQuote.FuelSurcharge, quote.LTLQuote.TotalCharge }); } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } return(updated); }
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 int CreateLoadTenderQuote(LTLLoadTenderQuote quote) { //Create a new LTLLoadTenderQuote int id = 0; try { object o = new DataService().ExecuteNonQueryWithReturn(SQL_CONNID, USP_LOADTENDERQUOTE_CREATE, new object[] { 0, quote.Owner , quote.BrokerName, quote.ContactName, quote.ContactPhone, quote.ContactEmail, quote.Description, quote.Comments , quote.LTLQuote.ShipDate , quote.LTLQuote.OriginCity, quote.LTLQuote.OriginState, quote.LTLQuote.OriginZip, quote.LTLQuote.InsidePickup, quote.LTLQuote.LiftGateOrigin, quote.LTLQuote.AppointmentOrigin, quote.LTLQuote.SameDayPickup , quote.LTLQuote.DestinationCity, quote.LTLQuote.DestinationState, quote.LTLQuote.DestinationZip, quote.LTLQuote.InsideDelivery, quote.LTLQuote.LiftGateDestination, quote.LTLQuote.AppointmentDestination , quote.LTLQuote.Pallet1Weight, quote.LTLQuote.Pallet1InsuranceValue, quote.LTLQuote.Pallet2Weight, quote.LTLQuote.Pallet2InsuranceValue, quote.LTLQuote.Pallet3Weight, quote.LTLQuote.Pallet3InsuranceValue, quote.LTLQuote.Pallet4Weight, quote.LTLQuote.Pallet4InsuranceValue, quote.LTLQuote.Pallet5Weight, quote.LTLQuote.Pallet5InsuranceValue , quote.LTLQuote.Pallets, quote.LTLQuote.Weight, quote.LTLQuote.PalletRate, quote.LTLQuote.FuelSurcharge, quote.LTLQuote.AccessorialCharge, quote.LTLQuote.InsuranceCharge, quote.LTLQuote.TollCharge, quote.LTLQuote.TotalCharge , quote.TotalChargeMin, quote.Logged, quote.LoggedBy }); id = (int)o; } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } return(id); }