Esempio n. 1
0
        private static async Task <bool> ImportXls(IWin32Window owner, string filePath, NotebookManager manager,
                                                   DatabaseSchema schema)
        {
            using (var f = new ImportXlsBookForm(filePath, schema, manager)) {
                f.ShowDialog(owner);
            }

            return(true);
        }
Esempio n. 2
0
        private static async Task <bool> ImportXls(IWin32Window owner, string filePath, NotebookManager manager,
                                                   DatabaseSchema schema)
        {
            string importSql;

            using (var f = new ImportXlsBookForm(filePath, schema, manager)) {
                if (f.ShowDialog(owner) != DialogResult.OK)
                {
                    return(false);
                }
                importSql = f.GeneratedImportSql;
            }

            return(await RunImportScript(importSql, owner, filePath, manager));
        }