Beispiel #1
0
        public static Shipper CreateShipper(string freightType, string number, string name, string addressLine1, string addressLine2, string addressCity, string addressState, string addressZip, string userData)
        {
            //Create a shipper
            Shipper oShipper = null;

            switch (freightType.ToLower())
            {
            case "tsort":   oShipper = CreateVendor(number, name, addressLine1, addressLine2, addressCity, addressState, addressZip, userData); break;

            case "returns": oShipper = CreateAgent(number, name, addressLine1, addressLine2, addressCity, addressState, addressZip); break;
            }
            return(oShipper);
        }
Beispiel #2
0
 public void RefreshDirectAssignments()
 {
     //Load direct freight assignments
     try {
         this.mDirectAssignments.Clear();
         StationAssignmentDS assignments = new StationAssignmentDS();
         assignments.Merge(this.mMediator.FillDataset(App.USP_DIRECTASSIGNMENTS, App.TBL_DIRECTASSIGNMENTS, null));
         foreach (StationAssignmentDS.DirectAssignmentTableRow row in assignments.DirectAssignmentTable)
         {
             SortStation    station = EnterpriseFactory.GetStation(row.StationNumber);
             Client         client  = EnterpriseFactory.CreateClient(row.ClientNumber, row.ClientDivision, row.Client, "", "", "", "", "");
             Shipper        shipper = EnterpriseFactory.CreateShipper(row.FreightType, row.ShipperNumber, row.Shipper, "", "", "", "", "", "");
             InboundFreight freight = FreightFactory.CreateInboundFreight(row.TerminalID, row.FreightID, row.FreightType, row.TDSNumber, "", row.TrailerNumber, row.Pickup, row.Pickup, 0, client, shipper);
             this.mDirectAssignments.Add(station.Number + freight.FreightID, new StationFreightAssignment(station, freight, row.SortType));
         }
     }
     catch (Exception ex) { throw ex; }
     finally { if (DirectAssignmentsChanged != null)
               {
                   DirectAssignmentsChanged(this, EventArgs.Empty);
               }
     }
 }