using HStation.Vmo; using System.ComponentModel; namespace HStation.WinFrmUI.Assets { public class TankViewModel { public TankViewModel() { } public TankViewModel(Vmo.AssetsTankMainVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.MinLevel = rhs.MinLevel; this.MaxLevel = rhs.MaxLevel; this.DN = rhs.DN; this.MinVol = rhs.MinVol; this.OverFlow = rhs.OverFlow; this.KeyWord = string.Join(",", rhs.KeyWords); this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; } public void Reset(Vmo.AssetsTankMainVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.MinLevel = rhs.MinLevel; this.MaxLevel = rhs.MaxLevel; this.DN = rhs.DN; this.MinVol = rhs.MinVol; this.OverFlow = rhs.OverFlow; this.KeyWord = string.Join(",", rhs.KeyWords); this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; } /// /// ID /// public long ID { get; set; } /// /// 名称 /// [DisplayName("名称")] [Browsable(true)] public string Name { get; set; } /// /// 最低水位 /// [DisplayName("最低水位")] [Browsable(true)] public double MinLevel { get; set; } /// /// 最高水位 /// [DisplayName("最高水位")] [Browsable(true)] public double MaxLevel { get; set; } /// /// 公称直径 /// [DisplayName("公称直径")] [Browsable(true)] public double DN { get; set; } /// /// 最小容积 /// [DisplayName("最小容积")] [Browsable(true)] public double MinVol { get; set; } /// /// 是否允许溢流 /// [DisplayName("是否允许溢流")] [Browsable(true)] public bool OverFlow { get; set; } /// /// 识别关键字 /// [DisplayName("关键字")] [Browsable(true)] public string KeyWord { get; set; } /// /// 排序码 /// [DisplayName("排序码")] [Browsable(true)] public int SortCode { get; set; } /// /// 说明 /// [DisplayName("说明")] [Browsable(true)] public string Description { get; set; } public AssetsTankMainVmo Vmo { get; set; } } }