예제 #1
0
        public override DataSet Clone()
        {
            InboundFreightDS cln = ((InboundFreightDS)(base.Clone()));

            cln.InitVars();
            return(cln);
        }
예제 #2
0
        public DataSet ToDataSet()
        {
            //Return a dataset containing values for this terminal
            InboundFreightDS ds = null;

            try {
                ds = new InboundFreightDS();
                InboundFreightDS.InboundFreightTableRow shipment = ds.InboundFreightTable.NewInboundFreightTableRow();
                shipment.FreightID            = this.mFreightID;
                shipment.FreightType          = this.mFreightType;
                shipment.CurrentLocation      = this.mCurrentLocation;
                shipment.TDSNumber            = this.mTDSNumber;
                shipment.TrailerNumber        = this.mTrailerNumber;
                shipment.StorageTrailerNumber = this.mStorageTrailerNumber;
                if (this.mClient != null)
                {
                    shipment.ClientNumber = this.mClient.Number;
                }
                if (this.mClient != null)
                {
                    shipment.ClientName = this.mClient.Name;
                }
                if (this.mShipper != null)
                {
                    shipment.ShipperNumber = this.mShipper.NUMBER;
                }
                if (this.mShipper != null)
                {
                    shipment.ShipperName = this.mShipper.NAME;
                }
                shipment.PickupDate     = this.mPickupDate;
                shipment.PickupNumber   = this.mPickupNumber;
                shipment.Status         = this.mStatus;
                shipment.Cartons        = this.mCartons;
                shipment.Pallets        = this.mPallets;
                shipment.CarrierNumber  = this.mCarrierNumber;
                shipment.DriverNumber   = this.mDriverNumber;
                shipment.FloorStatus    = this.mFloorStatus;
                shipment.SealNumber     = this.mSealNumber;
                shipment.UnloadedStatus = this.mUnloadedStatus;
                shipment.VendorKey      = this.mVendorKey;
                shipment.ReceiveDate    = this.mReceiveDate;
                shipment.TerminalID     = this.mTerminalID;
                shipment.CubeRatio      = this.mCubeRatio;
                ds.InboundFreightTable.AddInboundFreightTableRow(shipment);
                if (this.mClient != null)
                {
                    ds.Merge(this.mClient.ToDataSet());
                }
                if (this.mShipper != null)
                {
                    ds.Merge(this.mShipper.ToDataSet());
                }
                ds.AcceptChanges();
            }
            catch (Exception) { }
            return(ds);
        }
예제 #3
0
        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);
        }
예제 #4
0
        public static InboundFreight CreateInboundFreight(int terminalID, string freightID, string carrier, string trailerNumber, int cartons)
        {
            //
            InboundFreight freight = null;

            try {
                InboundFreightDS.IndirectInboundFreightTableRow trip = new InboundFreightDS().IndirectInboundFreightTable.NewIndirectInboundFreightTableRow();
                //trip.TerminalID = terminalID;
                trip.Number        = freightID;
                trip.Carrier       = carrier;
                trip.TrailerNumber = trailerNumber;
                trip.CartonCount   = cartons;
                freight            = new IndirectInboundFreight(trip);
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new ApplicationException("Unexpected exception creating inbound freight.", ex); }
            return(freight);
        }
예제 #5
0
        public static InboundFreight CreateInboundFreight(int terminalID, string freightID, string freightType, int TDSNumber, string vendorKey, string trailerNumber, string pickupDate, string pickupNumber, decimal cubeRatio, Client client, Shipper shipper)
        {
            //
            InboundFreight freight = null;

            try {
                InboundFreightDS.DirectInboundFreightTableRow shipment = new InboundFreightDS().DirectInboundFreightTable.NewDirectInboundFreightTableRow();
                shipment.TerminalID    = terminalID;
                shipment.FreightID     = freightID;
                shipment.FreightType   = freightType;
                shipment.TDSNumber     = TDSNumber;
                shipment.VendorKey     = vendorKey;
                shipment.TrailerNumber = trailerNumber;
                shipment.PickupDate    = pickupDate;
                shipment.PickupNumber  = pickupNumber;
                shipment.CubeRatio     = cubeRatio;
                freight = new DirectInboundFreight(shipment, client, shipper);
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new ApplicationException("Unexpected exception creating inbound freight.", ex); }
            return(freight);
        }