清理引用,将NavigatorServices更改为使用Message来实现导航的切换

This commit is contained in:
2025-06-23 17:01:06 +08:00
parent 8ee4b7bc05
commit 8fcd2fdf2a
62 changed files with 711 additions and 767 deletions

View File

@@ -1,25 +1,25 @@
using SqlSugar;
namespace PMSWPF.Data
{
public class DbContext
{
private static SqlSugarClient _db;
namespace PMSWPF.Data;
public static SqlSugarClient GetInstance()
public class DbContext
{
private static SqlSugarClient _db;
public static SqlSugarClient GetInstance()
{
if (_db == null)
{
if (_db == null)
var connectionString = "server=127.0.0.1;port=3306;user=root;password=Pgw15221236646; database=pmswpf;";
_db = new SqlSugarClient(new ConnectionConfig
{
string connectionString = "server=127.0.0.1;port=3306;user=root;password=Pgw15221236646; database=pmswpf;";
_db = new SqlSugarClient(new ConnectionConfig()
{
ConnectionString = connectionString,
DbType = DbType.MySql, // 根据实际数据库类型修改如DbType.MySql等
IsAutoCloseConnection = true,
InitKeyType = InitKeyType.Attribute
});
}
return _db;
ConnectionString = connectionString,
DbType = DbType.MySql, // 根据实际数据库类型修改如DbType.MySql等
IsAutoCloseConnection = true,
InitKeyType = InitKeyType.Attribute
});
}
return _db;
}
}
}