User Tools

Site Tools


taxengine:integration:code_samples:c_sample_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
taxengine:integration:code_samples:c_sample_code [2015/08/06 17:21] – [Console App in C#] chucktaxengine:integration:code_samples:c_sample_code [2015/08/06 19:56] – [Console App in C#] chuck
Line 38: Line 38:
             string companyDatabase = "TWO";             string companyDatabase = "TWO";
             string systemDatabase = "DYNAMICS";             string systemDatabase = "DYNAMICS";
 +            string itemCategory = "FREIGHT";
             Int16 timeOutSeconds = 60;             Int16 timeOutSeconds = 60;
             bool displayProgessBar = true;             bool displayProgessBar = true;
Line 100: Line 101:
                     int lineNumber = 1;                     int lineNumber = 1;
                     txEngn.LineAdd(lineNumber);                     txEngn.LineAdd(lineNumber);
- 
                     do                     do
                     {                     {
-                        /// We now provide the ZIP code.+                        Console.WriteLine("Enter an item category. Press enter for {0}", itemCategory); 
 +                        string ic = Console.ReadLine(); 
 +                        if (ic != ""
 +                            itemCategory = ic; 
 +                        if (itemCategory != ""
 +                        { 
 +                            try 
 +                            { 
 +                                txEngn.LineItemCategory = itemCategory; 
 +                                Console.WriteLine("Item category has been set to {0}", txEngn.LineItemCategory); 
 +                            } 
 +                            catch (Exception e) 
 +                            { 
 +                                Console.WriteLine(e.Message); 
 +                                if (txEngn.LineItemCategory == ""
 +                                    Console.WriteLine("Item category is blank"); 
 +                                else 
 +                                    Console.WriteLine("Item category is {0}", txEngn.LineItemCategory); 
 +                                Console.WriteLine(""); 
 +                            } 
 +                        } 
 +                        /// Select a ZIP code.
                         Console.WriteLine("Enter a ZIP code");                         Console.WriteLine("Enter a ZIP code");
                         zip = Console.ReadLine();                         zip = Console.ReadLine();
Line 118: Line 139:
                             continue;                             continue;
                         }                         }
 +                        // Fetch the default tax schedule for this zip.
 +                        txEngn.LineTaxScheduleSelect();
                         /*                         /*
                         * At this point, the Portal object will have identified and made                         * At this point, the Portal object will have identified and made
taxengine/integration/code_samples/c_sample_code.txt · Last modified: 2015/08/06 20:00 by chuck

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki