|
@@ -19,7 +19,7 @@ namespace UniformMaterialManagementSystem.Utils
|
|
private const string Password = "88384e6a-07e0-47e9-8214-4470a16e78da";
|
|
private const string Password = "88384e6a-07e0-47e9-8214-4470a16e78da";
|
|
private static readonly string SourcePath = $"{DataBasePath}\\UniformMaterialManagementSystem.db";
|
|
private static readonly string SourcePath = $"{DataBasePath}\\UniformMaterialManagementSystem.db";
|
|
|
|
|
|
- public static async Task<bool> ExportData()
|
|
|
|
|
|
+ public static string ExportData()
|
|
{
|
|
{
|
|
// 创建 SaveFileDialog 实例
|
|
// 创建 SaveFileDialog 实例
|
|
var saveFileDialog = new SaveFileDialog
|
|
var saveFileDialog = new SaveFileDialog
|
|
@@ -33,14 +33,14 @@ namespace UniformMaterialManagementSystem.Utils
|
|
|
|
|
|
// 显示对话框并检查用户是否选择了文件
|
|
// 显示对话框并检查用户是否选择了文件
|
|
if (saveFileDialog.ShowDialog() == false)
|
|
if (saveFileDialog.ShowDialog() == false)
|
|
- return false;
|
|
|
|
|
|
+ return string.Empty;
|
|
|
|
|
|
// 获取选中的文件路径
|
|
// 获取选中的文件路径
|
|
var targetPath = saveFileDialog.FileName;
|
|
var targetPath = saveFileDialog.FileName;
|
|
|
|
|
|
EncryptFile(SourcePath, targetPath);
|
|
EncryptFile(SourcePath, targetPath);
|
|
|
|
|
|
- return true;
|
|
|
|
|
|
+ return targetPath;
|
|
}
|
|
}
|
|
|
|
|
|
public static async void ExportTable<T>(IEnumerable<T> sourceData, string tableName, bool isExecMigrate = false) where T : class?
|
|
public static async void ExportTable<T>(IEnumerable<T> sourceData, string tableName, bool isExecMigrate = false) where T : class?
|