示例#1
0
文件: BLLUser.cs 项目: 15831944/C-12-
        //根据部门查找人员信息
        public List <UserInfo> FindByAgency(string agency, int secrecylevel)
        {
            BLLAgency       blag     = new BLLAgency();
            int             agencyid = blag.FindByName(agency).AgencyID;
            List <UserInfo> res      = dbcontext.UserInfoContext.Where(u => u.AgencyID == agencyid && u.SecrecyLevel <= secrecylevel && u.IsPass == true).ToList();

            //去掉超级管理员
            UserInfo user = dbcontext.UserInfoContext.Where(u => u.UserName == "超级管理员").FirstOrDefault();

            if (res.Contains(user))
            {
                res.Remove(user);
            }

            return(res);
        }