using System.ComponentModel; using Yw.Untity; namespace Yw.WinFrmUI { public class DivisionViewModel { public DivisionViewModel() { } public DivisionViewModel(Yw.Vmo.DivisionVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.ParentID = TreeParentIdsHelper.GetLastParentID(rhs.ParentIds); this.Type = rhs.Type; this.ADCode = rhs.ADCode; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.CountryCode = rhs.CountryCode; } public void Reset(Yw.Vmo.DivisionVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.ParentID = TreeParentIdsHelper.GetLastParentID(rhs.ParentIds); this.Type = rhs.Type; this.ADCode = rhs.ADCode; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.CountryCode = rhs.CountryCode; } public long ID { get; set; } /// /// 名称 /// [DisplayName("名称")] [Browsable(true)] public string Name { get; set; } /// /// 国家编码 /// [DisplayName("国家编码")] [Browsable(true)] public string CountryCode { get; set; } /// /// 父级ID列表 /// [DisplayName("父级ID列表")] [Browsable(true)] public long ParentID { get; set; } /// /// 类型 /// [DisplayName("类型")] [Browsable(true)] public Yw.Model.eDivisionType Type { get; set; } /// /// 高德地图城市编码 /// [DisplayName("高德地图城市编码")] [Browsable(true)] public string ADCode { get; set; } /// /// 标签名称 /// [DisplayName("标签名称")] [Browsable(true)] public string TagName { get; set; } /// /// 排序码 /// [DisplayName("排序码")] [Browsable(true)] public int SortCode { get; set; } /// /// 说明 /// [DisplayName("说明")] [Browsable(true)] public string Description { get; set; } } }