namespace Yw.WinFrmUI
{
///
/// 组件ViewModel
///
public class HydroParterViewModel
{
///
///
///
public HydroParterViewModel() { }
///
///
///
public HydroParterViewModel(Yw.Model.HydroParterInfo rhs)
{
this.ID = rhs.ID;
this.Catalog = HydroParterCatalogHelper.GetCatalogName(rhs.Catalog);
this.Code = rhs.Code;
this.Name = rhs.Name;
this.ModelType = rhs.ModelType;
this.HasDb = !string.IsNullOrEmpty(rhs.DbId);
this.DbLocked = rhs.DbLocked;
this.FlagsString = Yw.Untity.FlagsHelper.ToString(rhs.Flags);
this.Description = rhs.Description;
this.Vmo = rhs;
}
///
/// id
///
[DisplayName("ID")]
[Display(Name = "ID")]
public long ID { get; set; }
///
/// 分类
///
[DisplayName("分类")]
[Display(Name = "分类")]
public string Catalog { get; set; }
///
/// 编码
///
[DisplayName("编码")]
[Display(Name = "编码")]
public string Code { get; set; }
///
/// 名称
///
[DisplayName("名称")]
[Display(Name = "名称")]
public string Name { get; set; }
///
/// 型号
///
[DisplayName("型号")]
[Display(Name = "型号")]
public string ModelType { get; set; }
///
/// 匹配
///
[DisplayName("匹配")]
[Display(Name = "匹配")]
public bool HasDb { get; set; }
///
/// 锁定
///
[DisplayName("锁定")]
[Display(Name = "锁定")]
public bool DbLocked { get; set; }
///
/// 标签
///
[DisplayName("标签")]
[Display(Name = "标签")]
public string FlagsString { get; set; }
///
/// 说明
///
[DisplayName("说明")]
[Display(Name = "说明")]
public string Description { get; set; }
///
/// Vmo
///
[Browsable(false)]
public Yw.Model.HydroParterInfo Vmo { get; set; }
}
}