Beispiel #1
0
        /// <summary>
        /// 得到一个人员的分管领导
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public string GetChargeLeader(Guid userID)
        {
            var mainStation = GetMainStation(userID);

            if (mainStation == null)
            {
                return("");
            }
            RoadFlow.Platform.Organize borg = new Organize();
            var station = borg.Get(mainStation);

            if (station == null)
            {
                return("");
            }
            if (!station.ChargeLeader.IsNullOrEmpty())
            {
                return(station.ChargeLeader);
            }
            var parents = borg.GetAllParent(station.Number);

            foreach (var parent in parents)
            {
                if (!parent.ChargeLeader.IsNullOrEmpty())
                {
                    return(parent.ChargeLeader);
                }
            }
            return("");
        }
Beispiel #2
0
        /// <summary>
        /// 得到一个人员的主管。
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public string GetLeader(Guid userId)
        {
            Guid organizeId = this.GetMainStation(userId);

            if (Guid.Empty.Equals(organizeId))
            {
                return(string.Empty);
            }
            Organize organizeBll = new Organize();

            Data.Model.Organize organize = organizeBll.Get(organizeId);
            if (organize == null)
            {
                return(string.Empty);
            }
            if (!string.IsNullOrEmpty(organize.Leader))
            {
                return(organize.Leader);
            }
            List <Data.Model.Organize> list = organizeBll.GetAllParent(organize.Number);

            foreach (Data.Model.Organize current in list)
            {
                if (!string.IsNullOrEmpty(current.Leader))
                {
                    return(current.Leader);
                }
            }
            return(string.Empty);
        }
Beispiel #3
0
        /// <summary>
        /// 得到一个人员的分管领导。
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public string GetChargeLeader(Guid userId)
        {
            Guid organizeId = this.GetMainStation(userId);

            if (organizeId == null)
            {
                return(string.Empty);
            }
            Organize organizeBll = new Organize();

            Data.Model.Organize organize = organizeBll.Get(organizeId);
            if (organize == null)
            {
                return(string.Empty);
            }
            if (!string.IsNullOrEmpty(organize.ChargeLeader))
            {
                return(organize.ChargeLeader);
            }
            var parents = organizeBll.GetAllParent(organize.Number);

            foreach (var current in parents)
            {
                if (!string.IsNullOrEmpty(current.ChargeLeader))
                {
                    return(current.ChargeLeader);
                }
            }
            return(string.Empty);
        }
Beispiel #4
0
        public string GetParentDeptLeader(Guid userID)
        {
            Guid     mainStation = this.GetMainStation(userID);
            Organize organize1   = new Organize();

            RoadFlow.Data.Model.Organize organize2 = organize1.Get(mainStation);
            if (organize2 == null)
            {
                return("");
            }
            foreach (RoadFlow.Data.Model.Organize organize3 in organize1.GetAllParent(organize2.Number))
            {
                if (!organize3.Leader.IsNullOrEmpty())
                {
                    return(organize3.Leader);
                }
            }
            return("");
        }
Beispiel #5
0
        public string GetChargeLeader(Guid userID)
        {
            Guid     mainStation = GetMainStation(userID);
            Organize organize    = new Organize();

            RoadFlow.Data.Model.Organize organize2 = organize.Get(mainStation);
            if (organize2 == null)
            {
                return("");
            }
            if (!organize2.ChargeLeader.IsNullOrEmpty())
            {
                return(organize2.ChargeLeader);
            }
            foreach (RoadFlow.Data.Model.Organize item in organize.GetAllParent(organize2.Number))
            {
                if (!item.ChargeLeader.IsNullOrEmpty())
                {
                    return(item.ChargeLeader);
                }
            }
            return("");
        }