Пример #1
0
        public static IBShipment GetShipment(string freightID)
        {
            //Return an existing shipment from the inbound freight collection
            IBShipment shipment = null;

            try {
                //Merge from collection (dataset)
                InboundFreightDS.InboundFreightTableRow row = (InboundFreightDS.InboundFreightTableRow)_InboundFreight.InboundFreightTable.Select("FreightID='" + freightID + "'")[0];
                shipment = new IBShipment(row);
            }
            catch (Exception ex) { throw new ApplicationException("Failed to get shipment.", ex); }
            return(shipment);
        }
Пример #2
0
 public IBShipment(InboundFreightDS.InboundFreightTableRow shipment)
 {
     //Constructor
     try {
         if (shipment != null)
         {
             if (!shipment.IsFreightIDNull())
             {
                 this._freightID = shipment.FreightID;
             }
             if (!shipment.IsFreightTypeNull())
             {
                 this._freightType = shipment.FreightType;
             }
             if (!shipment.IsCurrentLocationNull())
             {
                 this._currentLocation = shipment.CurrentLocation;
             }
             if (!shipment.IsTDSNumberNull())
             {
                 this._tdsNumber = shipment.TDSNumber;
             }
             if (!shipment.IsTrailerNumberNull())
             {
                 this._trailerNumber = shipment.TrailerNumber;
             }
             if (!shipment.IsStorageTrailerNumberNull())
             {
                 this._storageTrailerNumber = shipment.StorageTrailerNumber;
             }
             if (!shipment.IsClientNumberNull())
             {
                 this._clientNumber = shipment.ClientNumber;
             }
             if (!shipment.IsClientNameNull())
             {
                 this._clientName = shipment.ClientName;
             }
             if (!shipment.IsShipperNumberNull())
             {
                 this._shipperNumber = shipment.ShipperNumber;
             }
             if (!shipment.IsShipperNameNull())
             {
                 this._shipperName = shipment.ShipperName;
             }
             if (!shipment.IsPickupNull())
             {
                 this._pickup = shipment.Pickup;
             }
             if (!shipment.IsStatusNull())
             {
                 this._status = shipment.Status;
             }
             if (!shipment.IsCartonsNull())
             {
                 this._cartons = shipment.Cartons;
             }
             if (!shipment.IsPalletsNull())
             {
                 this._pallets = shipment.Pallets;
             }
             if (!shipment.IsCarrierNumberNull())
             {
                 this._carrierNumber = shipment.CarrierNumber;
             }
             if (!shipment.IsDriverNumberNull())
             {
                 this._driverNumber = shipment.DriverNumber;
             }
             if (!shipment.IsFloorStatusNull())
             {
                 this._floorStatus = shipment.FloorStatus;
             }
             if (!shipment.IsSealNumberNull())
             {
                 this._sealNumber = shipment.SealNumber;
             }
             if (!shipment.IsUnloadedStatusNull())
             {
                 this._unloadedStatus = shipment.UnloadedStatus;
             }
             if (!shipment.IsVendorKeyNull())
             {
                 this._vendorKey = shipment.VendorKey;
             }
             if (!shipment.IsReceiveDateNull())
             {
                 this._receiveDate = shipment.ReceiveDate;
             }
             if (!shipment.IsTerminalIDNull())
             {
                 this._terminalID = shipment.TerminalID;
             }
             if (!shipment.IsIsSortableNull())
             {
                 this._issortable = shipment.IsSortable;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Could not create a new inbound shipment.", ex); }
 }