Beispiel #1
0
 public override void AddList(DispatchDS list)
 {
     //
     try {
         for (int i = 0; i < list.ScheduledInboundTable.Rows.Count; i++)
         {
             DispatchDS.ScheduledInboundTableRow row = list.ScheduledInboundTable[i];
             InboundFreight entry = (InboundFreight)Item();
             entry.ID        = row.ID;
             entry.Created   = row.Created;
             entry.CreatedBy = row.CreatedBy;
             if (!row.IsDriverNameNull())
             {
                 entry.DriverName = row.DriverName;
             }
             if (!row.IsTrailerNumberNull())
             {
                 entry.TrailerNumber = row.TrailerNumber;
             }
             if (!row.IsFromLocationNull())
             {
                 entry.FromLocation = row.FromLocation;
             }
             if (!row.IsToLocationNull())
             {
                 entry.ToLocation = row.ToLocation;
             }
             if (!row.IsScheduledDepartureNull())
             {
                 entry.ScheduledDeparture = row.ScheduledDeparture;
             }
             if (!row.IsActualDepartureNull())
             {
                 entry.ActualDeparture = row.ActualDeparture;
             }
             if (!row.IsScheduledDeliveryNull())
             {
                 entry.ScheduledDelivery = row.ScheduledDelivery;
             }
             if (!row.IsActualDeliveryNull())
             {
                 entry.ActualDelivery = row.ActualDelivery;
             }
             if (!row.IsCommentsNull())
             {
                 entry.Comments = row.Comments;
             }
             if (!row.IsConfirmedNull())
             {
                 entry.Confirmed = row.Confirmed;
             }
             Add(entry);
         }
     }
     catch (Exception ex) { throw ex; }
 }
Beispiel #2
0
 public InboundFreight(DispatchDS.ScheduledInboundTableRow row, Mediator mediator) : base(mediator)
 {
     //Constructor
     try {
         if (row != null)
         {
             this._id        = row.ID;
             this._created   = row.Created;
             this._createdby = row.CreatedBy;
             if (!row.IsDriverNameNull())
             {
                 this._drivername = row.DriverName;
             }
             if (!row.IsTrailerNumberNull())
             {
                 this._trailernumber = row.TrailerNumber;
             }
             if (!row.IsFromLocationNull())
             {
                 this._fromlocation = row.FromLocation;
             }
             if (!row.IsToLocationNull())
             {
                 this._tolocation = row.ToLocation;
             }
             if (!row.IsScheduledDepartureNull())
             {
                 this._scheduleddeparture = row.ScheduledDeparture;
             }
             if (!row.IsActualDepartureNull())
             {
                 this._actualdeparture = row.ActualDeparture;
             }
             if (!row.IsScheduledDeliveryNull())
             {
                 this._scheduleddelivery = row.ScheduledDelivery;
             }
             if (!row.IsActualDeliveryNull())
             {
                 this._actualdelivery = row.ActualDelivery;
             }
             if (!row.IsCommentsNull())
             {
                 this._comments = row.Comments;
             }
             if (!row.IsConfirmedNull())
             {
                 this._confirmed = row.Confirmed;
             }
         }
     }
     catch (Exception ex) { throw ex; }
 }