Ejemplo n.º 1
0
        public List <List <string> > runReport(OCObject oC)
        {
            List <List <string> > results       = new List <List <string> >();
            List <string>         nullLocations = new List <string>();
            string ok = "n";

            Console.WriteLine("This is the current number of queries: " + oC.shortHands.Count);
            Console.Write("Would you like to list the current THEC list (y/n): ");
            if (Console.ReadLine().ToLower() == "y")
            {
                shortReport(oC);
                Console.WriteLine();
            }

            Console.Write("\nIs This OK? (y/n): ");
            ok = Console.ReadLine();
            if ((ok.ToLower() == "y") || (ok.ToLower() == "yes"))
            {
                try { results = oC.fullExecute(); }
                catch (Exception e)
                {
                    Console.WriteLine("Problem with main Execution\n");
                    throw e;
                }


                //TO be changed to function to make into a .csv file later
                for (int i = 0; i < results.Count; i++)
                {
                    //Console.WriteLine("Entry: ");
                    for (int j = 0; j < results[i].Count; j++)
                    {
                        if (results[i][j].ToLower() == "null")
                        {
                            nullLocations.Add((i + 1) + ", " + (j + 1));
                        }
                    }
                }

                //List all Nulls found and their location
                foreach (string item in nullLocations)
                {
                    string entry = item.Substring(0, item.IndexOf(','));
                    string loc   = item.Substring(entry.Length + 2);
                    Console.Write("Null at row: " + entry);
                    Console.WriteLine(" and column: " + loc);
                }
            }
            else
            {
                Console.WriteLine("Confirmed: No report ran.");
            }

            return(results);
        }
Ejemplo n.º 2
0
        public void runPLSQLFile(OCObject oC)
        {
            List <List <string> > Test = oC.fullExecute();

            foreach (List <string> item in Test)
            {
                Console.WriteLine("Entry: ");
                foreach (string i in item)
                {
                    Console.WriteLine("Row: " + i);
                }
            }
        }