using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Yw.EPAnet; using Yw.Model; namespace Yw.WinFrmUI { /// /// /// public class HydroEnergyAnalyListItemViewModel { /// /// /// public HydroEnergyAnalyListItemViewModel() { } /// /// /// public HydroEnergyAnalyListItemViewModel(HydroEnergyAnalyItemViewModel item) { this.BeginGroup = item.BeginGroup; this.Name = item.Name; this.Code = item.Code; this.LinkStatus = HydroLinkStatusHelper.GetStatusName(item.LinkStatus); this.RatedQ = item.RatedQ; this.RatedP = item.RatedP; this.RatedH = item.RatedH; this.RatedN = item.RatedN; this.CurrentHz = item.CurrentHz; this.CurrentQ = item.CurrentQ.HasValue ? Math.Round(item.CurrentQ.Value, 1) : null; this.CurrentPr1 = item.CurrentPr1.HasValue ? Math.Round(item.CurrentPr1.Value, 2) : null; this.CurrentPr2 = item.CurrentPr2.HasValue ? Math.Round(item.CurrentPr2.Value, 2) : null; this.CurrentH = item.CurrentH.HasValue ? Math.Round(item.CurrentH.Value, 2) : null; this.CurrentP = item.CurrentP.HasValue ? Math.Round(item.CurrentP.Value, 2) : null; this.CurrentE = item.CurrentE.HasValue ? Math.Round(item.CurrentE.Value, 2) : null; } /// /// 分组 /// [Display(Name = "分组")] public string BeginGroup { get; set; } /// /// 名称 /// [Display(Name = "名称")] public string Name { get; set; } /// /// 编码 /// [Display(Name = "编码")] public string Code { get; set; } /// /// 运行状态 /// [Display(Name = "运行状态")] public string LinkStatus { get; set; } /// /// 额定流量 /// [Display(Name = "额定流量(m³/h)")] public double RatedQ { get; set; } /// /// 额定功率 /// [Display(Name = "额定功率(kW)")] public double RatedP { get; set; } /// /// 额定扬程 /// [Display(Name = "额定扬程(m)")] public double RatedH { get; set; } /// /// 额定转速 /// [Display(Name = "额定转速(r/min)")] public double RatedN { get; set; } /// /// 设定频率 /// [Display(Name = "设定频率(hz)")] public double CurrentHz { get; set; } /// /// 计算流量 /// [Display(Name = "计算流量(m³/h)")] public double? CurrentQ { get; set; } /// /// 进口压力 /// [Display(Name = "进口压力(m)")] public double? CurrentPr1 { get; set; } /// /// 出口压力 /// [Display(Name = "出口压力(m)")] public double? CurrentPr2 { get; set; } /// /// 扬程 /// [Display(Name = "扬程(m)")] public double? CurrentH { get; set; } /// /// 功率 /// [Display(Name = "功率(kW)")] public double? CurrentP { get; set; } /// /// 效率 /// [Display(Name = "效率(%)")] public double? CurrentE { get; set; } } }