using Yw.Vmo; namespace HStation.WinFrmUI { /// /// 监测点辅助类 /// public class SimulationMonitorHelper { /// /// /// public SimulationMonitorHelper(long modelId) { _modelId = modelId; } private long _modelId;//模型id private List _allMonitorList = null;//所有监测点列表 /// /// 获取 /// public async Task> Get() { if (_allMonitorList == null) { _allMonitorList = await BLLFactory.Instance.GetByModelID(_modelId); if (_allMonitorList == null) { _allMonitorList = new List(); } } return _allMonitorList; } /// /// 更新 /// public async Task> Update(string code) { var allMonitorList = await Get(); allMonitorList.RemoveAll(x => x.Relation == code); var monitorList = await BLLFactory.Instance.GetByRelation(_modelId, code); if (monitorList != null && monitorList.Count > 0) { allMonitorList.AddRange(monitorList); } return monitorList; } } }