예제 #1
0
 public Pickup(DispatchDS.PickupLogTableRow row, Mediator mediator) : base(mediator)
 {
     //Constructor
     try {
         if (row != null)
         {
             this._id        = row.ID;
             this._created   = row.Created;
             this._createdby = row.CreatedBy;
             if (!row.IsCallerNameNull())
             {
                 this._callername = row.CallerName;
             }
             if (!row.IsClientNameNull())
             {
                 this._clientname = row.ClientName;
             }
             if (!row.IsShipperNameNull())
             {
                 this._shippername = row.ShipperName;
             }
             if (!row.IsShipperAddressNull())
             {
                 this._shipperaddress = row.ShipperAddress;
             }
             if (!row.IsDeliveryWindowNull())
             {
                 this._deliverywindow = row.DeliveryWindow;
             }
             if (!row.IsTerminalNull())
             {
                 this._terminal = row.Terminal;
             }
             if (!row.IsDriverNameNull())
             {
                 this._drivername = row.DriverName;
             }
             if (!row.IsAmountNull())
             {
                 this._amount = row.Amount;
             }
             if (!row.IsAmountTypeNull())
             {
                 this._amounttype = row.AmountType;
             }
             if (!row.IsFreightTypeNull())
             {
                 this._freighttype = row.FreightType;
             }
             if (!row.IsAutoNumberNull())
             {
                 this._autonumber = row.AutoNumber;
             }
             if (!row.IsRequestDateNull())
             {
                 this._requestdate = row.RequestDate;
             }
             if (!row.IsPickUpDateNull())
             {
                 this._pickupdate = row.PickUpDate;
             }
             if (!row.IsCommentsNull())
             {
                 this._comments = row.Comments;
             }
             if (!row.IsUpdatedNull())
             {
                 this._updated = row.Updated;
             }
             if (!row.IsMustBeReadyNull())
             {
                 this._mustbeready = row.MustBeReady;
             }
             if (!row.IsPickedUpNull())
             {
                 this._pickedup = row.PickedUp;
             }
         }
     }
     catch (Exception ex) { throw ex; }
 }
예제 #2
0
 public override void AddList(DispatchDS list)
 {
     //Add a list of entries to this schedule
     try {
         for (int i = 0; i < list.PickupLogTable.Rows.Count; i++)
         {
             DispatchDS.PickupLogTableRow row = list.PickupLogTable[i];
             Pickup entry = (Pickup)Item();
             entry.ID        = row.ID;
             entry.Created   = row.Created;
             entry.CreatedBy = row.CreatedBy;
             if (!row.IsCallerNameNull())
             {
                 entry.CallerName = row.CallerName;
             }
             if (!row.IsClientNameNull())
             {
                 entry.ClientName = row.ClientName;
             }
             if (!row.IsShipperNameNull())
             {
                 entry.ShipperName = row.ShipperName;
             }
             if (!row.IsShipperAddressNull())
             {
                 entry.ShipperAddress = row.ShipperAddress;
             }
             if (!row.IsDeliveryWindowNull())
             {
                 entry.DeliveryWindow = row.DeliveryWindow;
             }
             if (!row.IsTerminalNull())
             {
                 entry.Terminal = row.Terminal;
             }
             if (!row.IsDriverNameNull())
             {
                 entry.DriverName = row.DriverName;
             }
             if (!row.IsAmountNull())
             {
                 entry.Amount = row.Amount;
             }
             if (!row.IsAmountTypeNull())
             {
                 entry.AmountType = row.AmountType;
             }
             if (!row.IsFreightTypeNull())
             {
                 entry.FreightType = row.FreightType;
             }
             if (!row.IsAutoNumberNull())
             {
                 entry.AutoNumber = row.AutoNumber;
             }
             if (!row.IsRequestDateNull())
             {
                 entry.RequestDate = row.RequestDate;
             }
             if (!row.IsPickUpDateNull())
             {
                 entry.PickUpDate = row.PickUpDate;
             }
             if (!row.IsCommentsNull())
             {
                 entry.Comments = row.Comments;
             }
             if (!row.IsUpdatedNull())
             {
                 entry.Updated = row.Updated;
             }
             if (!row.IsMustBeReadyNull())
             {
                 entry.MustBeReady = row.MustBeReady;
             }
             if (!row.IsPickedUpNull())
             {
                 entry.PickedUp = row.PickedUp;
             }
             Add(entry);
         }
     }
     catch (Exception ex) { throw ex; }
 }