Exemplo n.º 1
0
 public override void AddList(DispatchDS list)
 {
     //
     try {
         for (int i = 0; i < list.ScheduledOutboundTable.Rows.Count; i++)
         {
             DispatchDS.ScheduledOutboundTableRow row = list.ScheduledOutboundTable[i];
             OutboundFreight entry = (OutboundFreight)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; }
 }
Exemplo n.º 2
0
 public OutboundFreight(DispatchDS.ScheduledOutboundTableRow 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; }
 }