消除所有错误,重新构建
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using DMS.Core.Helper;
|
||||
using DMS.Core.Models;
|
||||
using DMS.Helper;
|
||||
using DMS.WPF.Models;
|
||||
using DMS.WPF.Services;
|
||||
|
||||
namespace DMS.Services.Processors
|
||||
{
|
||||
@@ -18,15 +20,15 @@ namespace DMS.Services.Processors
|
||||
try
|
||||
{
|
||||
// 假设 DataServices 有一个方法来更新 Variable
|
||||
await _dataServices.UpdateVariableAsync(context.Data);
|
||||
// await _dataServices.UpdateVariableAsync(context.Data);
|
||||
// NlogHelper.Info($"数据库变量 {context.Data.Name} 更新成功,值为: {context.Data.DataValue}");
|
||||
|
||||
if (!_dataServices.AllVariables.TryGetValue(context.Data.Id, out Variable oldVariable))
|
||||
{
|
||||
NlogHelper.Warn($"数据库更新完成修改变量值是否改变时在_dataServices.AllVariables中找不到Id:{context.Data.Id},Name:{context.Data.Name}的变量。");
|
||||
context.IsHandled = true;
|
||||
}
|
||||
oldVariable.DataValue = context.Data.DataValue;
|
||||
// if (!_dataServices.AllVariables.TryGetValue(context.Data.Id, out Variable oldVariable))
|
||||
// {
|
||||
// NlogHelper.Warn($"数据库更新完成修改变量值是否改变时在_dataServices.AllVariables中找不到Id:{context.Data.Id},Name:{context.Data.Name}的变量。");
|
||||
// context.IsHandled = true;
|
||||
// }
|
||||
// oldVariable.DataValue = context.Data.DataValue;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user