lixiaojun
2024-11-28 e39e22e12380551c79f99a9c96bb77d5dc3839b1
WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/00-core/HydroMonitorValueExtensions.cs
@@ -1,12 +1,32 @@
using DevExpress.CodeParser;
namespace Yw.WinFrmUI
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 监测值拓展
    /// </summary>
    public static class HydroMonitorValueExtensions
    {
        /// <summary>
        /// 更新监测值列表
        /// </summary>
        public static void UpdateMonitorValue(this List<HydroMonitorValueViewModel> allMonitorValueList, string monitorInfo)
        {
            if (allMonitorValueList == null || allMonitorValueList.Count < 1)
            {
                return;
            }
            if (string.IsNullOrEmpty(monitorInfo))
            {
                return;
            }
            var allWorkingMonitorList = JsonHelper.Json2Object<List<HydroWorkingMonitorViewModel>>(monitorInfo);
            if (allWorkingMonitorList == null || allWorkingMonitorList.Count < 1)
            {
                return;
            }
            allMonitorValueList.UpdateMonitorValue(allWorkingMonitorList);
        }
        /// <summary>
        /// 更新监测值列表
        /// </summary>