using Yw.Model; namespace HStation.WinFrmUI.Xhs.PumpProduct { public class CurrentTreeViewModel { /* public CurrentTreeViewModel(CurrentTreeViewModel rhs) : base() { this.ID = rhs.ID; this.Name = rhs.Name; this.IsType = true; this.IsGroup = false; this.ImageIndex = ImageLib.Listview; }*/ public CurrentTreeViewModel() { } public CurrentTreeViewModel(Vmo.AssetsPumpSeriesVmo rhs, long PumpTypeID) : base() { this.ID = rhs.ID; this.CatalogID = rhs.CatalogID; this.Name = rhs.Name; this.ParentID = PumpTypeID; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.TagName = rhs.TagName; this.UseStatus = (eUseStatus)rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; this.IsType = false; this.IsGroup = false; this.ImageIndex = ImageLib.Series; } public CurrentTreeViewModel(Vmo.AssetsPumpTypeVmo rhs) : base() { this.ID = rhs.ID; this.Name = rhs.Name; this.ParentID = 1; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; this.IsGroup = false; this.IsType = true; this.ImageIndex = ImageLib.Type; } public CurrentTreeViewModel(Vmo.AssetsPumpGroupVmo rhs) : base() { this.ID = rhs.ID; this.Name = rhs.Name; this.ParentID = rhs.PumpSeriesID; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; this.IsGroup = true; this.ImageIndex = ImageLib.Group; } public void Reset(Vmo.AssetsPumpSeriesVmo rhs) { this.ID = rhs.ID; this.CatalogID = rhs.CatalogID; this.Name = rhs.Name; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; } public void Reset(Vmo.AssetsPumpGroupVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; } public void Reset(Vmo.AssetsPumpTypeVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.SortCode = rhs.SortCode; this.Description = rhs.Description; } public long ID { get; set; } public long CatalogID { get; set; } public long ParentID { get; set; } public string Name { get; set; } public Dictionary Paras { get; set; } public List Flags { get; set; } public string TagName { get; set; } public eUseStatus UseStatus { get; set; } public int SortCode { get; set; } public string MotorFrequency { get; set; } public string Description { get; set; } public object Model { get; set; } public bool IsGroup { get; set; } = false; public int ImageIndex { get; set; } public bool IsType { get; set; } } }