Пример #1
0
        private static IEnumerable <IS5InvAssembled> GetDataFromSystemFive(IConfiguration config)
        {
            string DSN = config["System5DSN"];

            Options opt = OdbcOptions.GetOptions(DSN);
            OdbcContext_S5Inventory context = new OdbcContext_S5Inventory(opt);

            // Assemble Inventory
            S5Inventory InvRaw = new S5Inventory
                                 (
                AltSuply_Records: context.AltSuplies
                , Comments_Records: context.CommentsLines
                , Inventry_27_Records: context.Inventry_27s
                , InvPrice_Records: context.InvPrices
                , Stok_Records: context.StokLines
                                 );
            IEnumerable <IS5InvAssembled> InvAss = InvRaw.ToAssembled();

            return(InvAss);
        }
Пример #2
0
        private static IEnumerable <IS5InvAssembled> GetDataFromJson(IConfiguration config)
        {
            string CachedFilesDirectory = config["SourceDirectory"];

            Options opt = PagedJsonOptions_S5Inventory.GetOptions(CachedFilesDirectory, new List <string>());
            OdbcContext_S5Inventory context = new OdbcContext_S5Inventory(opt);

            // Assemble Inventory
            S5Inventory InvRaw = new S5Inventory
                                 (
                AltSuply_Records: context.AltSuplies
                , Comments_Records: context.CommentsLines
                , Inventry_27_Records: context.Inventry_27s
                , InvPrice_Records: context.InvPrices
                , Stok_Records: context.StokLines
                                 );
            IEnumerable <IS5InvAssembled> InvAss = InvRaw.ToAssembled();

            return(InvAss);
        }
 public static void TestOdbc() //Func<string, OdbcOptions> funcOptions
 {
     Options opt = OdbcOptions.GetOptions("DSN=LOCALDELTATEST");
     OdbcContext_S5Inventory context = new OdbcContext_S5Inventory(opt);
 }