GMS.Web.OrgChart/Models/Branch.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Windows;
using System.Windows.Media;
using Newtonsoft.Json;

namespace GMS.Web.OrgChart.Models
{
    public class Branch : ModelBase
    {
        public Branch()
        {
            this.Embranchment = new ObservableCollection<Branch>();
            this.Staffs = new ObservableCollection<Staff>();
        }

        public int ID { get; set; }
        
        private string name;
        public string Name
        {
            get { return name; }
            set
            {
                name = value;
                NotifyPropertyChanged("Name");
            }
        }

        private Branch parentBranch;
        [JsonIgnore]
        public Branch ParentBranch
        {
            get { return parentBranch; }
            set
            {
                parentBranch = value;
                NotifyPropertyChanged("ParentBranch");
            }
        }

        private ObservableCollection<Branch> embranchment;
        public ObservableCollection<Branch> Embranchment
        {
            get { return embranchment; }
            set
            {
                embranchment = value;
                this.UpdateEmbranchment();
                embranchment.CollectionChanged += (s, e) => UpdateEmbranchment();
                NotifyPropertyChanged("Embranchment");
            }
        }

        private ObservableCollection<Staff> staffs;
        public ObservableCollection<Staff> Staffs
        {
            get { return staffs; }
后面还有 131 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。