Ejemplo n.º 1
0
        public static void test()
        {
            // Get the relations for this table
            DataTable relations = MappingEngine.getRelationsForDataSource(dataSources["PatientMealChoices"].getID());

            Program.DisplayDataTable(relations);
        }
Ejemplo n.º 2
0
        public static DataTable joinData(Dictionary <Wrapper, DataTable> results)
        {
            // Get all of the relations needed to join the data we have
            //DataTable relations = MappingEngine.getRelationsForTable(

            // Empty data table to hold our results
            DataTable resultsTable = new DataTable();

            // Loop
            foreach (KeyValuePair <Wrapper, DataTable> data in results)
            {
                // Get the relations for this table
                DataTable relations = MappingEngine.getRelationsForDataSource(data.Key.getID());

                // Variable to make our table easier to access
                DataTable table = data.Value;

                resultsTable = joinDataTables(resultsTable, table, "NHSNumber", "NHSNumber");
            }

            Program.DisplayDataTable(resultsTable);

            return(new DataTable());
        }