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; }
|
/// <summary>
|
/// 名称
|
/// </summary>
|
|
[DisplayName("名称")]
|
[Browsable(true)]
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 国家编码
|
/// </summary>
|
|
[DisplayName("国家编码")]
|
[Browsable(true)]
|
public string CountryCode { get; set; }
|
|
/// <summary>
|
/// 父级ID列表
|
/// </summary>
|
|
[DisplayName("父级ID列表")]
|
[Browsable(true)]
|
public long ParentID { get; set; }
|
|
/// <summary>
|
/// 类型
|
/// </summary>
|
|
[DisplayName("类型")]
|
[Browsable(true)]
|
public Yw.Model.eDivisionType Type { get; set; }
|
|
/// <summary>
|
/// 高德地图城市编码
|
/// </summary>
|
|
[DisplayName("高德地图城市编码")]
|
[Browsable(true)]
|
public string ADCode { get; set; }
|
|
/// <summary>
|
/// 标签名称
|
/// </summary>
|
|
[DisplayName("标签名称")]
|
[Browsable(true)]
|
public string TagName { get; set; }
|
|
/// <summary>
|
/// 排序码
|
/// </summary>
|
|
[DisplayName("排序码")]
|
[Browsable(true)]
|
public int SortCode { get; set; }
|
|
/// <summary>
|
/// 说明
|
/// </summary>
|
|
[DisplayName("说明")]
|
[Browsable(true)]
|
public string Description { get; set; }
|
}
|
}
|