Example #1
0
        /// <summary>
        /// Populate the top common ship to information
        /// </summary>
        /// <param name="shipTo"></param>
        /// <param name="csv"></param>
        /// <returns></returns>
        private static bool PopulateShipToHeader(ref ShipTo shipTo, ShipToCSV csv)
        {
            bool   success = true;
            Random random  = new Random();

            shipTo.batch = random.Next().ToString(); // 32-bit integer
            DataRow r = csv.DT.Rows[0];

            shipTo.ConceptID = r["CONCEPT CODE"].ToString();
            double?parent = JDE.GetParentFromConcept(shipTo.ConceptID);

            if (null != parent)
            {
                shipTo.ParentAddress = (double)parent;
            }
            else
            {
                log.Debug($"Couldn't find parent for {r["CONCEPT CODE"].ToString()}");
                success = false;
            }
            return(success);
        }