You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CaiQie/RfidWeb/Tool/BaseManager.cs

25 lines
807 B
C#

1 week ago
using System;
using System.Collections.Generic;
using System.Linq;
using DB.Entity;
using DB.Service;
using NewLife.Caching;
namespace RfidWeb
{
public class BaseManager
{
protected AlarmDataService alarmDataService = new AlarmDataService();
protected ICache cache = Cache.Default;
protected readonly int Max = 31;
protected readonly TimeSpan timeOut = TimeSpan.FromSeconds(5);
protected Dictionary<int, string> GetDic(List<AlarmData> list, string plcAb, string address)
{
var dicCha = list.Where(x => x.PlcAb == plcAb && x.Address == address
&& !string.IsNullOrEmpty(x.Msg))
.ToDictionary(x => x.No, x => x.Msg);
return dicCha;
}
}
}