using System.ComponentModel.DataAnnotations;
namespace PBS.WinFrmUI.Hydro
{
///
/// 设施
///
public class FacilityPropertyViewModel
{
///
///
///
public FacilityPropertyViewModel() { }
///
///
///
public FacilityPropertyViewModel(PBS.Vmo.FacilityVmo rhs)
{
this.ID = rhs.ID;
this.PlaceID = rhs.PlaceID;
this.PackageID = rhs.PackageID;
this.Name = rhs.Name;
this.WaterSupply = rhs.WaterSupply;
this.SupplyMode = rhs.SupplyMode;
this.Floor = rhs.Floor;
this.FloorHeight = rhs.FloorHeight;
this.Households = rhs.Households;
this.MaxWaterDemand = rhs.MaxWaterDemand;
this.ConstantPressure = rhs.ConstantPressure;
this.TerminalPressure = rhs.TerminalPressure;
this.Paras = rhs.Paras == null ? null : new(rhs.Paras);
this.MaxHeight = rhs.MaxHeight;
this.ConnectionAddress = rhs.ConnectionAddress;
this.ConnectionType = rhs.ConnectionType;
this.ModelInfo = rhs.ModelInfo;
this.ModelPath = rhs.ModelPath;
this.Flags = rhs.Flags?.ToList();
this.TagName = rhs.TagName;
this.UseStatus = (Yw.Vmo.eUseStatus)(int)rhs.UseStatus;
this.SortCode = rhs.SortCode;
this.Description = rhs.Description;
}
///
/// 标识
///
[Browsable(false)]
public long ID { get; set; }
///
/// 场所标识
///
[Browsable(false)]
public long PlaceID { get; set; }
///
/// 成套设备标识
///
[Browsable(false)]
public long PackageID { get; set; }
///
/// 名称
///
[Browsable(false)]
public string Name { get; set; }
///
/// 供水单元
///
[Display(Name = "供水单元")]
[DisplayName("供水单元")]
[PropertyOrder(1)]
[ShowEditor(false)]
[Browsable(true)]
public eWaterSupply WaterSupply { get; set; }
///
/// 供水模式
///
[Display(Name = "供水模式")]
[DisplayName("供水模式")]
[ShowEditor(false)]
[PropertyOrder(2)]
[Browsable(true)]
public eSupplyMode SupplyMode { get; set; }
///
/// 楼层
///
[Display(Name = "楼层")]
[DisplayName("楼层")]
[PropertyOrder(3)]
[Browsable(true)]
public int Floor { get; set; }
///
/// 层高
///
[Display(Name = "层高")]
[DisplayName("层高")]
[DisplayUnit("m")]
[PropertyOrder(4)]
[Browsable(true)]
public double? FloorHeight { get; set; }
///
/// 户数
///
[Category("详细")]
[Display(Name = "户数")]
[DisplayName("户数")]
[PropertyOrder(5)]
[Browsable(true)]
public int? Households { get; set; }
///
/// 最大需水量
///
[Display(Name = "最大需水量")]
[DisplayName("最大需水量")]
[DisplayUnit("m³/h")]
[PropertyOrder(6)]
[Browsable(true)]
public double? MaxWaterDemand { get; set; }
///
/// 恒定压力
///
[Display(Name = "恒定压力")]
[DisplayName("恒定压力")]
[DisplayUnit("m")]
[PropertyOrder(7)]
[Browsable(true)]
public double? ConstantPressure { get; set; }
///
/// 末端压力
///
[Display(Name = "末端压力")]
[DisplayName("末端压力")]
[DisplayUnit("m")]
[PropertyOrder(8)]
[Browsable(true)]
public double? TerminalPressure { get; set; }
///
/// 顶楼标高
///
[Display(Name = "顶楼标高")]
[DisplayName("顶楼标高")]
[DisplayUnit("m")]
[PropertyOrder(9)]
[Browsable(true)]
public double MaxHeight { get; set; }
///
/// 连接类型
///
[Browsable(false)]
public eConnectionType ConnectionType { get; set; }
///
/// IP地址
///
[Browsable(false)]
public string ConnectionAddress { get; set; }
///
/// 模型信息
///
[Browsable(false)]
public string ModelInfo { get; set; }
///
/// 模型路径
///
[Browsable(false)]
public string ModelPath { get; set; }
///
/// 参数
///
[Browsable(false)]
public Dictionary Paras { get; set; }
///
/// 标签
///
[Browsable(false)]
public List Flags { get; set; }
///
/// 标志
///
[Browsable(false)]
public string TagName { get; set; }
///
/// 使用状态
///
[Browsable(false)]
public Yw.Vmo.eUseStatus UseStatus { get; set; }
///
/// 排序码
///
[Browsable(false)]
public int SortCode { get; set; }
///
/// 说明
///
[Display(Name = "说明")]
[Browsable(false)]
public string Description { get; set; }
}
}