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