qin
2025-03-14 ef1fc8b0eeea6972964d8c62dfef7819bea49d1a
WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs
@@ -1,6 +1,8 @@
using System.ComponentModel;
using HStation.PBS;
using System.ComponentModel;
using Yw.Untity;
namespace HStation.WinFrmUI.PBS
namespace PBS.WinFrmUI
{
    public class PlaceViewModel
    {
@@ -8,24 +10,39 @@
        {
        }
        /*
                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.Flags = FlagsHelper.ToString(rhs.Flags);
        }
        public void Resert(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.Flags = FlagsHelper.ToString(rhs.Flags);
        }
        /// <summary>
        /// 场所
        ///</summary>
        [DisplayName("场所")]
        [Browsable(true)]
        [DisplayName("ID")]
        [Browsable(false)]
        public long ID { get; set; }
        /// <summary>
@@ -39,7 +56,7 @@
        /// 名称
        ///</summary>
        [DisplayName("名称")]
        [Browsable(false)]
        [Browsable(true)]
        public string Name { get; set; }
        /// <summary>
@@ -47,7 +64,7 @@
        ///</summary>
        [DisplayName("场所类型")]
        [Browsable(true)]
        public int PlaceType { get; set; }
        public ePlaceType PlaceType { get; set; }
        /// <summary>
        /// 场所信息
@@ -89,7 +106,7 @@
        ///</summary>
        [DisplayName("使用状态")]
        [Browsable(true)]
        public int UseStatus { get; set; }
        public Yw.Vmo.eUseStatus UseStatus { get; set; }
        /// <summary>
        /// 排序码