namespace HStation.WinFrmUI.Assets
{
public class AdaptingViewModel
{
public AdaptingViewModel()
{
}
public AdaptingViewModel(Vmo.AdaptingManageVmo rhs)
{
this.AdaptingType = rhs.AdaptingType;
this.Coefficient = rhs.Coefficient;
this.Material = rhs.Material;
this.ID = rhs.ID;
if (rhs.Caliber == null)
{
this.Caliber = "默认";
}
else
{
this.Caliber = rhs.Caliber.ToString();
}
this.Description = rhs.Description;
this.Name = rhs.Name;
this.SortCode = rhs.SortCode;
}
public void Reset(Vmo.AdaptingManageVmo rhs)
{
this.AdaptingType = (HStation.Assets.eAdaptingType)rhs.AdaptingType;
this.Coefficient = rhs.Coefficient;
this.Material = rhs.Material;
this.ID = rhs.ID;
if (rhs.Caliber == null)
{
this.Caliber = "默认";
}
else
{
this.Caliber = rhs.Caliber.ToString();
}
this.Description = rhs.Description;
this.Name = rhs.Name;
this.SortCode = rhs.SortCode;
}
///
/// UserID
///
public long ID { get; set; }
///
/// 附件类型(弯头,三通,四通....)
///
[DisplayName("附件类型")]
[Browsable(true)]
public HStation.Assets.eAdaptingType AdaptingType { get; set; }
///
/// 名称
///
[DisplayName("型号")]
[Browsable(true)]
public string Name { get; set; }
///
/// 口径
///
[DisplayName("口径(mm)")]
[Browsable(true)]
public string Caliber { get; set; }
///
/// 材料
///
[DisplayName("材料")]
[Browsable(true)]
public string Material { get; set; }
///
/// 损失系数
///
[DisplayName("损失系数")]
[Browsable(true)]
public double? Coefficient { get; set; }
///
/// 排序码
///
[DisplayName("排序码")]
[Browsable(true)]
public int SortCode { get; set; }
///
/// 说明
///
[DisplayName("说明")]
[Browsable(true)]
public string Description { get; set; }
}
}