using HStation.Service.Assets; namespace HStation.WinFrmUI { /// /// /// public class AssetsPipeMainMgrViewModel { /// /// /// public AssetsPipeMainMgrViewModel() { } /// /// /// public AssetsPipeMainMgrViewModel(HStation.Vmo.AssetsPipeMainVmo rhs) { this.ID = rhs.ID; this.SeriesID = rhs.SeriesID; this.Name = rhs.Name; this.MinorLoss = rhs.MinorLoss; this.Caliber = rhs.Caliber; this.Manning = rhs.Manning; this.Hazen = rhs.Hazen; this.Darcy = rhs.Darcy; this.KeyWords = KeyWordHelper.ToString(rhs.KeyWords); this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.Description = rhs.Description; this.Material = rhs.Material; this.Vmo = rhs; } /// /// /// public void Reset(HStation.Vmo.AssetsPipeMainVmo rhs) { this.ID = rhs.ID; this.SeriesID = rhs.SeriesID; this.Name = rhs.Name; this.MinorLoss = rhs.MinorLoss; this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.Manning = rhs.Manning; this.Hazen = rhs.Hazen; this.Darcy = rhs.Darcy; this.KeyWords = KeyWordHelper.ToString(rhs.KeyWords); this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.Description = rhs.Description; this.Vmo = rhs; } /// /// id /// [Display(Name = "ID")] public long ID { get; set; } /// /// 系列id /// [Display(Name = "系列ID")] public long SeriesID { get; set; } /// /// 名称 /// [Display(Name = "名称")] public string Name { get; set; } /// /// 口径 /// [Display(Name = "口径(mm)")] public double? Caliber { get; set; } /// /// 材料 /// [Display(Name = "材料")] public string Material { get; set; } /// /// 喷射系数 /// [Display(Name = "局阻系数")] public double MinorLoss { get; set; } /// ///Hazen /// [Display(Name = "威廉姆斯")] public double Hazen { get; set; } /// ///Darcy /// [Display(Name = "达西")] public double? Darcy { get; set; } /// ///Manning /// [Display(Name = "曼宁")] public double? Manning { get; set; } /// /// 关键字 /// [Display(Name = "关键字")] public string KeyWords { get; set; } /// /// 标签 /// [Display(Name = "标签")] public string Flags { get; set; } /// /// 标志 /// [Display(Name = "标志")] public string TagName { get; set; } /// /// 排序码 /// [Display(Name = "排序码")] public int SortCode { get { return this.Vmo.SortCode; } set { this.Vmo.SortCode = value; } } /// /// 说明 /// [Display(Name = "说明")] public string Description { get; set; } /// /// /// public HStation.Vmo.AssetsPipeMainVmo Vmo { get; set; } } }