예제 #1
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);
        }
예제 #2
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);
        }