This commit is contained in:
Administrator committed 2026-05-08 02:37:32 +08:00
commit 4f1025e247
2 files changed
+37 -10

No files matched your search

+18 -6
View File
@@ -63,10 +63,6 @@ namespace SunlightAggregationManager.ViewModel
ActionLog = (SQLiteHelpers.ExecuteDataSet("select * from ActionLog", null)?.Tables[0] ?? new DataTable()).Clone();
// SQLiteHelpers.Close();
if (UserData.Columns.Contains("UserID"))
{
UserData.Columns.Remove("UserID");
}
DataRow[] dataRows = UserData.Select("State<90");
foreach (DataRow row in dataRows)
{
@@ -160,20 +156,36 @@ namespace SunlightAggregationManager.ViewModel
}
}
public static DataRow? Selet_Row(DataTable DB, string? key)//查询
{
try
{
lock (DB)
{
DataRow drEmployee = DB.Select(key).First();
return drEmployee;
}
}
catch (Exception ex)
{
Console.WriteLine("Selet_Row:" + ex.ToString());
return null;
}
}
public static object? Selet_Memory(DataTable DB, string name, string? key)//查询
{
try
{
lock (DB)
{
var drEmployee = DB.Select(key).First();
DataRow drEmployee = DB.Select(key).First();
object? index = drEmployee.Field<object>(name);
return index;
}
}
catch (Exception ex)
{
Console.WriteLine("SDTD:" + ex.ToString());
Console.WriteLine("Selet_Memory:" + ex.ToString());
return null;
}
}