public Arrival(DispatchDS.LineHaulTableRow row, Mediator mediator) : base(mediator) { //Constructor try { if (row != null) { this._id = row.ID; this._created = row.Created; this._createdby = row.CreatedBy; if (!row.IsTrailerNumberNull()) { this._trailernumber = row.TrailerNumber; } if (!row.IsTerminalNull()) { this._terminal = row.Terminal; } if (!row.IsScheduledArrivalNull()) { this._scheduledarrival = row.ScheduledArrival; } if (!row.IsActualArrivalNull()) { this._actualarrival = row.ActualArrival; } if (!row.IsCommentsNull()) { this._comments = row.Comments; } } } catch (Exception ex) { throw ex; } }
public override void AddList(DispatchDS list) { // try { for (int i = 0; i < list.LineHaulTable.Rows.Count; i++) { DispatchDS.LineHaulTableRow row = list.LineHaulTable[i]; Arrival entry = (Arrival)Item(); entry.ID = row.ID; entry.Created = row.Created; entry.CreatedBy = row.CreatedBy; if (!row.IsTrailerNumberNull()) { entry.TrailerNumber = row.TrailerNumber; } if (!row.IsTerminalNull()) { entry.Terminal = row.Terminal; } if (!row.IsScheduledArrivalNull()) { entry.ScheduledArrival = row.ScheduledArrival; } if (!row.IsActualArrivalNull()) { entry.ActualArrival = row.ActualArrival; } if (!row.IsCommentsNull()) { entry.Comments = row.Comments; } Add(entry); } } catch (Exception ex) { throw ex; } }