using System.ComponentModel; using Yw.Untity; namespace HStation.WinFrmUI.WE { public class ItemViewModel { public ItemViewModel() { } public ItemViewModel(Vmo.WE.ItemVmo rhs, Vmo.WE.UtensilMappingVmo mapping, string utensilName) { this.ID = rhs.ID; this.Name = rhs.Name; this.UtensilID = mapping.UtensilID; this.UtensilName = utensilName; this.RatedFlow = mapping.RatedFlow; this.MinRatedFlow = mapping.MinRatedFlow; this.UtensilCount = mapping.UtensilCount; this.Description = rhs.Description; } public void Reset(Vmo.WE.ItemVmo rhs, Vmo.WE.UtensilMappingVmo mapping, string utensilName) { this.ID = rhs.ID; this.Name = rhs.Name; this.UtensilID = mapping.UtensilID; this.UtensilName = utensilName; this.RatedFlow = mapping.RatedFlow; this.MinRatedFlow = mapping.MinRatedFlow; this.UtensilCount = mapping.UtensilCount; this.Description = rhs.Description; } [DisplayName("ID")] [Browsable(false)] public long ID { get; set; } /// /// 所属项名称 /// [DisplayName("所属项名称")] [Browsable(true)] public string Name { get; set; } /// /// 器具名称 /// [DisplayName("器具名称")] [Browsable(true)] public string UtensilName { get; set; } /// /// 用水器具标识 /// [DisplayName("UtensilID")] [Browsable(true)] public long UtensilID { get; set; } /// /// 用水器具数量 /// [DisplayName("器具数量")] [Browsable(true)] public int UtensilCount { get; set; } /// /// 额定流量 /// [DisplayName("额定流量")] [Browsable(true)] public double RatedFlow { get; set; } /// /// 最小额定流量 /// [DisplayName("最小额定流量")] [Browsable(true)] public double MinRatedFlow { get; set; } /// /// 说明 /// [DisplayName("说明")] [Browsable(true)] public string Description { get; set; } } }