public IndirectInboundFreight(InboundFreightDS.IndirectInboundFreightTableRow trip) { //Constructor try { //Configure this trip from the trip configuration information if (trip != null) { if (!trip.IsNumberNull()) { base.mFreightID = trip.Number.Trim(); } if (!trip.IsCartonCountNull()) { base.mCartonCount = trip.CartonCount; } if (!trip.IsCarrierNull()) { base.mCarrier = trip.Carrier.Trim(); } if (!trip.IsTrailerNumberNull()) { base.mTrailerNumber = trip.TrailerNumber.Trim(); } if (!trip.IsStartedNull()) { this.mStarted = trip.Started; } if (!trip.IsStoppedNull()) { this.mStopped = trip.Stopped; } if (!trip.IsExportedNull()) { this.mExported = trip.Exported; } if (!trip.IsImportedNull()) { this.mImported = trip.Imported; } if (!trip.IsScannedNull()) { this.mScanned = trip.Scanned; } if (!trip.IsOSDSendNull()) { this.mOSDSend = trip.OSDSend; } if (!trip.IsReceivedNull()) { this.mReceived = trip.Received; } if (!trip.IsCartonsExportedNull()) { this.mCartonsExported = trip.CartonsExported; } } } catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new IndirectInboundFreight instance.", ex); } }
public override DataSet ToDataSet() { //Return a dataset containing values for this terminal InboundFreightDS ds = null; try { ds = new InboundFreightDS(); InboundFreightDS.IndirectInboundFreightTableRow trip = ds.IndirectInboundFreightTable.NewIndirectInboundFreightTableRow(); trip.Number = base.mFreightID; trip.CartonCount = base.mCartonCount; trip.Carrier = base.mCarrier; trip.TrailerNumber = base.mTrailerNumber; ds.IndirectInboundFreightTable.AddIndirectInboundFreightTableRow(trip); } catch (Exception) { } return(ds); }