예제 #1
0
 public ShipScheduleTrip(ShipScheduleDS.ShipScheduleMasterTableRow trip, ShipScheduleDS.ShipScheduleDetailTableRow[] tls)
 {
     //Constructor
     try {
         this.mAssignedTLs = new ShipScheduleDS();
         if (trip != null)
         {
             this._scheduleid   = trip.ScheduleID;
             this._sortcenterid = trip.SortCenterID;
             if (!trip.IsSortCenterNull())
             {
                 this._sortcenter = trip.SortCenter;
             }
             this._scheduledate = trip.ScheduleDate;
             this._tripid       = trip.TripID;
             if (!trip.IsTemplateIDNull())
             {
                 this._templateid = trip.TemplateID;
             }
             if (!trip.IsBolNumberNull())
             {
                 this._bolnumber = trip.BolNumber;
             }
             if (!trip.IsCarrierServiceIDNull())
             {
                 this._carrierserviceid = trip.CarrierServiceID;
             }
             if (!trip.IsCarrierNull())
             {
                 this._carrier = trip.Carrier;
             }
             if (!trip.IsLoadNumberNull())
             {
                 this._loadnumber = trip.LoadNumber;
             }
             if (!trip.IsTrailerIDNull())
             {
                 this._trailerid = trip.TrailerID;
             }
             if (!trip.IsTrailerNumberNull())
             {
                 this._trailernumber = trip.TrailerNumber;
             }
             if (!trip.IsTractorNumberNull())
             {
                 this._tractornumber = trip.TractorNumber;
             }
             if (!trip.IsScheduledCloseNull())
             {
                 this._scheduledclose = trip.ScheduledClose;
             }
             if (!trip.IsScheduledDepartureNull())
             {
                 this._scheduleddeparture = trip.ScheduledDeparture;
             }
             if (!trip.IsIsMandatoryNull())
             {
                 this._ismandatory = trip.IsMandatory;
             }
             if (!trip.IsFreightAssignedNull())
             {
                 this._freightassigned = trip.FreightAssigned;
             }
             if (!trip.IsTrailerCompleteNull())
             {
                 this._trailercomplete = trip.TrailerComplete;
             }
             if (!trip.IsPaperworkCompleteNull())
             {
                 this._paperworkcomplete = trip.PaperworkComplete;
             }
             if (!trip.IsTrailerDispatchedNull())
             {
                 this._trailerdispatched = trip.TrailerDispatched;
             }
             if (!trip.IsCanceledNull())
             {
                 this._canceled = trip.Canceled;
             }
             if (!trip.IsSCDEUserIDNull())
             {
                 this._scdeuserid = trip.SCDEUserID;
             }
             if (!trip.IsSCDELastUpdatedNull())
             {
                 this._scdelastupdated = trip.SCDELastUpdated;
             }
             if (!trip.IsSCDERowVersionNull())
             {
                 this._scderowversion = trip.SCDERowVersion;
             }
             if (!trip.IsStopIDNull())
             {
                 this._stopid = trip.StopID;
             }
             if (!trip.IsStopNumberNull())
             {
                 this._stopnumber = trip.StopNumber;
             }
             if (!trip.IsAgentTerminalIDNull())
             {
                 this._agentterminalid = trip.AgentTerminalID;
             }
             if (!trip.IsAgentNumberNull())
             {
                 this._agentnumber = trip.AgentNumber;
             }
             if (!trip.IsMainZoneNull())
             {
                 this._mainzone = trip.MainZone;
             }
             if (!trip.IsTagNull())
             {
                 this._tag = trip.Tag;
             }
             if (!trip.IsNotesNull())
             {
                 this._notes = trip.Notes;
             }
             if (!trip.IsScheduledArrivalNull())
             {
                 this._scheduledarrival = trip.ScheduledArrival;
             }
             if (!trip.IsScheduledOFD1Null())
             {
                 this._scheduledofd1 = trip.ScheduledOFD1;
             }
             if (!trip.IsS1UserIDNull())
             {
                 this._s1userid = trip.S1UserID;
             }
             if (!trip.IsS1LastUpdatedNull())
             {
                 this._s1lastupdated = trip.S1LastUpdated;
             }
             if (!trip.IsS1RowVersionNull())
             {
                 this._s1rowversion = trip.S1RowVersion;
             }
             if (!trip.IsS2StopIDNull())
             {
                 this._s2stopid = trip.S2StopID;
             }
             if (!trip.IsS2StopNumberNull())
             {
                 this._s2stopnumber = trip.S2StopNumber;
             }
             if (!trip.IsS2AgentTerminalIDNull())
             {
                 this._s2agentterminalid = trip.S2AgentTerminalID;
             }
             if (!trip.IsS2AgentNumberNull())
             {
                 this._s2agentnumber = trip.S2AgentNumber;
             }
             if (!trip.IsS2MainZoneNull())
             {
                 this._s2mainzone = trip.S2MainZone;
             }
             if (!trip.IsS2TagNull())
             {
                 this._s2tag = trip.S2Tag;
             }
             if (!trip.IsS2NotesNull())
             {
                 this._s2notes = trip.S2Notes;
             }
             if (!trip.IsS2ScheduledArrivalNull())
             {
                 this._s2scheduledarrival = trip.S2ScheduledArrival;
             }
             if (!trip.IsS2ScheduledOFD1Null())
             {
                 this._s2scheduledofd1 = trip.S2ScheduledOFD1;
             }
             if (!trip.IsS2UserIDNull())
             {
                 this._s2userid = trip.S2UserID;
             }
             if (!trip.IsS2LastUpdatedNull())
             {
                 this._s2lastupdated = trip.S2LastUpdated;
             }
             if (!trip.IsS2RowVersionNull())
             {
                 this._s2rowversion = trip.S2RowVersion;
             }
             if (!trip.IsNextCarrierNull())
             {
                 this._nextcarrier = trip.NextCarrier;
             }
             if (!trip.IsCarrierIDNull())
             {
                 this._carrierid = trip.CarrierID;
             }
             if (tls != null)
             {
                 ShipScheduleDS.ShipScheduleMasterTableRow _trip = this.mAssignedTLs.ShipScheduleMasterTable.NewShipScheduleMasterTableRow();
                 _trip.ScheduleID   = this.ScheduleID;
                 _trip.SortCenterID = this.SortCenterID;
                 _trip.TripID       = this.TripID;
                 this.mAssignedTLs.ShipScheduleMasterTable.AddShipScheduleMasterTableRow(_trip);
                 this.mAssignedTLs.Merge(tls);
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Could not create a new ship schedule trip.", ex); }
 }