Ejemplo n.º 1
0
        /// <summary>
        /// Adds the specified shipment history.
        /// </summary>
        /// <param name="shipmentHistory">The shipment history.</param>
        /// <returns></returns>
        public tbl_ShipmentHistory Add(tbl_ShipmentHistory shipmentHistory)
        {
            shipmentHistory.ID        = Guid.NewGuid();
            shipmentHistory.CreatedAt = DateTime.Now;

            _dataContext.tbl_ShipmentHistory.AddObject(shipmentHistory);
            _dataContext.SaveChanges();

            return(shipmentHistory);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds the history.
        /// </summary>
        /// <param name="dataManager">The data manager.</param>
        /// <param name="shipment">The shipment.</param>
        protected void AddHistory(DataManager dataManager, tbl_Shipment shipment)
        {
            var shipmentHistory = new tbl_ShipmentHistory
            {
                ShipmentID = shipment.ID,
                AuthorID = (Guid)CurrentUser.Instance.ContactID,
                SendDate = shipment.SendDate,                
                ShipmentAmount = shipment.ShipmentAmount,
                ShipmentStatusID = shipment.ShipmentStatusID,
                Note = shipment.Note
            };

            dataManager.ShipmentHistory.Add(shipmentHistory);
        }