duheng
2025-03-28 d5a2d7e66f9c8046bd88b8269e61aac5a2a265e2
WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs
@@ -1,6 +1,7 @@
using System.ComponentModel;
using Yw.Untity;
namespace HStation.WinFrmUI.PBS
namespace PBS.WinFrmUI
{
    public class PlaceViewModel
    {
@@ -8,38 +9,75 @@
        {
        }
        /*
                public PlaceViewModel(PBS.Vmo rhs)
                {
                    this.ID = rhs.ID;
                    this.RegionID = rhs.RegionID;
                    this.Name = rhs.Name;
                    this.PlaceType = rhs.PlaceType;
                    this.PlaceInfo = rhs.PlaceInfo;
                    this.Address = rhs.Address;
                    this.Flags = rhs.Flags?.ToList();
                }
        */
        public PlaceViewModel(Vmo.PlaceVmo rhs)
        {
            this.ID = rhs.ID;
            this.RegionID = rhs.RegionID;
            this.Name = rhs.Name;
            this.PlaceType = rhs.PlaceType;
            this.PlaceInfo = rhs.PlaceInfo;
            this.Address = rhs.Address;
            this.UseStatus = rhs.UseStatus;
            this.SortCode = rhs.SortCode;
            this.Description = rhs.Description;
            this.Paras = rhs.Paras;
            this.Flags = FlagsHelper.ToString(rhs.Flags);
            this.Vmo = rhs;
        }
        public PlaceViewModel(Vmo.PlaceVmo rhs, Yw.Vmo.MapInfoVmo map)
        {
            this.ID = rhs.ID;
            this.RegionID = rhs.RegionID;
            this.Name = rhs.Name;
            this.PlaceType = rhs.PlaceType;
            this.PlaceInfo = rhs.PlaceInfo;
            this.Address = rhs.Address;
            this.UseStatus = rhs.UseStatus;
            this.SortCode = rhs.SortCode;
            this.Description = rhs.Description;
            this.Paras = rhs.Paras;
            this.Flags = FlagsHelper.ToString(rhs.Flags);
            this.Vmo = rhs;
            this.MapInfo = map;
        }
        public void Resert(Vmo.PlaceVmo rhs, Yw.Vmo.MapInfoVmo map)
        {
            this.ID = rhs.ID;
            this.RegionID = rhs.RegionID;
            this.Name = rhs.Name;
            this.PlaceType = rhs.PlaceType;
            this.PlaceInfo = rhs.PlaceInfo;
            this.Address = rhs.Address;
            this.Paras = rhs.Paras;
            this.UseStatus = rhs.UseStatus;
            this.SortCode = rhs.SortCode;
            this.Description = rhs.Description;
            this.Flags = FlagsHelper.ToString(rhs.Flags);
            this.Vmo = rhs;
            this.MapInfo = map;
        }
        /// <summary>
        /// 场所
        ///</summary>
        [DisplayName("场所")]
        [Browsable(true)]
        [DisplayName("ID")]
        [Browsable(false)]
        public long ID { get; set; }
        /// <summary>
        /// 行政区域标识
        ///</summary>
        [DisplayName("行政区域标识")]
        [Browsable(false)]
        [Browsable(true)]
        public long RegionID { get; set; }
        /// <summary>
        /// 名称
        ///</summary>
        [DisplayName("名称")]
        [Browsable(false)]
        [Browsable(true)]
        public string Name { get; set; }
        /// <summary>
@@ -47,7 +85,7 @@
        ///</summary>
        [DisplayName("场所类型")]
        [Browsable(true)]
        public int PlaceType { get; set; }
        public ePlaceType PlaceType { get; set; }
        /// <summary>
        /// 场所信息
@@ -89,7 +127,7 @@
        ///</summary>
        [DisplayName("使用状态")]
        [Browsable(true)]
        public int UseStatus { get; set; }
        public Yw.Vmo.eUseStatus UseStatus { get; set; }
        /// <summary>
        /// 排序码
@@ -104,5 +142,15 @@
        [DisplayName("说明")]
        [Browsable(true)]
        public string Description { get; set; }
        /// <summary>
        /// 场所信息
        /// </summary>
        public Vmo.PlaceVmo Vmo { get; set; }
        /// <summary>
        /// 地图信息
        /// </summary>
        public Yw.Vmo.MapInfoVmo MapInfo { get; set; }
    }
}