Exemple #1
0
 //Interface
 public InboundFreight(InboundFreightDS.InboundFreightTableRow shipment, Client client, Shipper shipper)
 {
     //Constructor
     try {
         if (shipment != null)
         {
             if (!shipment.IsFreightIDNull())
             {
                 this.mFreightID = shipment.FreightID;
             }
             if (!shipment.IsFreightTypeNull())
             {
                 this.mFreightType = shipment.FreightType;
             }
             if (!shipment.IsCurrentLocationNull())
             {
                 this.mCurrentLocation = shipment.CurrentLocation;
             }
             if (!shipment.IsTDSNumberNull())
             {
                 this.mTDSNumber = shipment.TDSNumber;
             }
             if (!shipment.IsTrailerNumberNull())
             {
                 this.mTrailerNumber = shipment.TrailerNumber;
             }
             if (!shipment.IsStorageTrailerNumberNull())
             {
                 this.mStorageTrailerNumber = shipment.StorageTrailerNumber;
             }
             if (!shipment.IsPickupDateNull())
             {
                 this.mPickupDate = shipment.PickupDate;
             }
             if (!shipment.IsPickupNumberNull())
             {
                 this.mPickupNumber = shipment.PickupNumber;
             }
             if (!shipment.IsStatusNull())
             {
                 this.mStatus = shipment.Status;
             }
             if (!shipment.IsCartonsNull())
             {
                 this.mCartons = shipment.Cartons;
             }
             if (!shipment.IsPalletsNull())
             {
                 this.mPallets = shipment.Pallets;
             }
             if (!shipment.IsCarrierNumberNull())
             {
                 this.mCarrierNumber = shipment.CarrierNumber;
             }
             if (!shipment.IsDriverNumberNull())
             {
                 this.mDriverNumber = shipment.DriverNumber;
             }
             if (!shipment.IsFloorStatusNull())
             {
                 this.mFloorStatus = shipment.FloorStatus;
             }
             if (!shipment.IsSealNumberNull())
             {
                 this.mSealNumber = shipment.SealNumber;
             }
             if (!shipment.IsUnloadedStatusNull())
             {
                 this.mUnloadedStatus = shipment.UnloadedStatus;
             }
             if (!shipment.IsVendorKeyNull())
             {
                 this.mVendorKey = shipment.VendorKey;
             }
             if (!shipment.IsReceiveDateNull())
             {
                 this.mReceiveDate = shipment.ReceiveDate;
             }
             if (!shipment.IsTerminalIDNull())
             {
                 this.mTerminalID = shipment.TerminalID;
             }
             if (!shipment.IsCubeRatioNull())
             {
                 this.mCubeRatio = shipment.CubeRatio;
             }
         }
         this.mClient  = client;
         this.mShipper = shipper;
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new inbound shipment instance.", ex); }
 }