using Yw.Model; namespace Yw.WinFrmUI { /// /// 监测分析项视图 /// public class HydroMonitorAnalyItemViewModel { /// /// /// public HydroMonitorAnalyItemViewModel() { } /// /// /// public HydroMonitorAnalyItemViewModel ( HydroMonitorVmo rhs, Dictionary allVisualDict, Dictionary allCalcuVisualDict ) { this.VisualCode = rhs.Parter; this.VisualName = allVisualDict?.GetValue(rhs.Parter)?.Name; this.PropCode = rhs.PropName; this.PropName = HydroMonitorPropHelper.GetName(rhs.PropName); var calcuValue = allCalcuVisualDict?.GetValue(rhs.Parter)?.GetCalcuValue(rhs.PropName); this.CalcuValue = calcuValue.HasValue ? Math.Round(calcuValue.Value, 2) : null; this.UnitName = HydroMonitorPropHelper.GetUnit(rhs.PropName); } /// /// 构件编码 /// public string VisualCode { get; set; } /// /// 构件名称 /// public string VisualName { get; set; } /// /// 属性编码 /// public string PropCode { get; set; } /// /// 属性名称 /// public string PropName { get; set; } /// /// 计算值 /// public double? CalcuValue { get; set; } /// /// 单位名称 /// public string UnitName { get; set; } } }