Ejemplo n.º 1
0
        public void Export()
        {
            try
            {
                if (string.IsNullOrEmpty(ExportPath))
                {
                    throw new Exception("Path cannot be empty.");
                }

                EXP.Export(ExportPath);

                MessageBoxFactory.ShowInfo("Database exported to: " + ExportPath, "Exported");
            }
            catch (Exception e)
            {
                MessageBoxFactory.ShowError(e);
            }
        }
Ejemplo n.º 2
0
        public void Import()
        {
            try
            {
                if (string.IsNullOrEmpty(importPath) || !File.Exists(ImportPath))
                {
                    throw new Exception("File not found.");
                }

                EXP.Import(importPath);

                MessageBoxFactory.ShowInfo("Database has been imported.", "Imported");

                DatabaseUpdated = true;
            }
            catch (Exception e)
            {
                MessageBoxFactory.ShowError(e);
            }
        }