Example #1
0
        private static void PopulateConceptHeader(ref Concept con, ConceptCSV csv)
        {
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConceptCSV)).Location) + @"\" + "log4net.config"));
            log.Debug($"Populating concept header with {String.Join(",",csv)}");

            try
            {
                con.batch = JDE.GetNextBatchNumber().ToString();
                DataRow r = csv.DT.Rows[0];
                con.BillToAddress   = Double.Parse(r["CUSTOMER NUMBER"].ToString());
                con.ConceptID       = JDE.GetConceptID(con.BillToAddress);
                con.JulianOrderDate = CommonFunctions.DateStringToJulian(System.DateTime.Today.ToString());
                con.OrderDetails    = new List <ConceptLine>();
                con.PONumber        = r["PO NUMBER"].ToString();
                con.OrderedBy       = r["ORDERED BY"].ToString();
                con.ShippingVendor  = Double.Parse(r["SHIPPING VENDOR"].ToString());
                con.ShippingMode    = r["SHIPPING METHOD"].ToString();
            }
            catch (Exception eBLL)
            {
                log.Error($"Error populating concept header" + eBLL.Message);
                throw;
            }

            return;
        }
Example #2
0
        public void TestNextNumber()
        {
            double NextBatch    = JDE.GetNextBatchNumber();
            double NextDocument = JDE.GetDocumentNumbers(10);

            NextBatch    = JDE.GetNextBatchNumber();
            NextDocument = JDE.GetDocumentNumbers(1);
        }