/// <summary>
        /// 保存上传的app信息
        /// </summary>
        /// <param name="entity">app信息实体</param>
        /// <returns></returns>
        public bool SaveAppFile(T_APP_VERSION entity)
        {
            bool result = true;

            using (var dbContext = new DuPont_TestContext())
            {
                var existEntity = dbContext.T_APP_VERSION.Where(a => a.Platform == entity.Platform).FirstOrDefault();
                int saveRes     = 0;
                if (existEntity != null)
                {
                    entity.CREATE_DATE = existEntity.CREATE_DATE;
                    entity.Id          = existEntity.Id;
                    ClassValueCopyHelper.Copy(existEntity, entity);
                    saveRes = dbContext.SaveChanges();
                }
                else
                {
                    entity.UPDATE_DATE = null;
                    dbContext.T_APP_VERSION.Add(entity);
                    saveRes = dbContext.SaveChanges();
                }
            }

            return(result);
        }
 public int Modify <T>(T entity, Expression <Func <T, bool> > wherelambda) where T : class
 {
     using (var dbContext = new DuPont_TestContext())
     {
         var dbEntry = dbContext.Set <T>().Where(wherelambda).FirstOrDefault();
         if (dbEntry != null)
         {
             ClassValueCopyHelper.Copy(dbEntry, entity);
             return(dbContext.SaveChanges());
         }
     }
     return(0);
 }
Beispiel #3
0
 public int Update(T_SMS_MESSAGE entity)
 {
     using (var dbContext = new DuPont_TestContext())
     {
         var dbEntry = dbContext.T_SMS_MESSAGE.Find(entity.Id);
         if (dbEntry != null)
         {
             ClassValueCopyHelper.Copy(dbEntry, entity);
             return(dbContext.SaveChanges());
         }
     }
     return(0);
 }
 public int Update(T_FARMER_PUBLISHED_DEMAND entity)
 {
     using (var dbContext = new DuPont_TestContext())
     {
         var dbEntry = dbContext.T_FARMER_PUBLISHED_DEMAND.Find(entity.Id);
         if (dbEntry != null)
         {
             ClassValueCopyHelper.Copy(dbEntry, entity);
             return(dbContext.SaveChanges());
         }
     }
     return(0);
 }
Beispiel #5
0
        public long UpdateUserInfo(T_USER model, Dictionary <int, byte?> demandLevelInfoList, long loginid)
        {
            using (var dbContext = new DuPont_TestContext())
            {
                //创建事务,如果操作过程中出现异常,操作会回滚,防止产生脏数据
                using (var tran = dbContext.Database.BeginTransaction())
                {
                    //数据库操作
                    #region 修改用户基本信息
                    T_USER updmodel = dbContext.T_USER.Find(model.Id);
                    updmodel.UserName = model.UserName;
                    //updmodel.PhoneNumber = model.PhoneNumber;
                    updmodel.DPoint         = model.DPoint;
                    updmodel.Province       = model.Province;
                    updmodel.City           = model.City;
                    updmodel.Region         = model.Region;
                    updmodel.Township       = model.Township;
                    updmodel.Village        = model.Village;
                    updmodel.ModifiedUserId = loginid;
                    updmodel.ModifiedTime   = Utility.TimeHelper.GetChinaLocalTime();
                    //执行修改操作
                    var upd = dbContext.T_USER.Find(updmodel.Id);
                    if (upd != null)
                    {
                        ClassValueCopyHelper.Copy(upd, updmodel);
                        dbContext.SaveChanges();
                    }
                    #endregion
                    #region 修改用户的角色信息以及技能信息
                    //1获取各角色的最高星星数
                    byte?farmerstar   = demandLevelInfoList[0];
                    byte?operatorstar = 0;
                    byte?businesstar  = 0;
                    T_USER_ROLE_DEMANDTYPELEVEL_RELATION skillmodel = new T_USER_ROLE_DEMANDTYPELEVEL_RELATION();
                    //农机手
                    for (int i = 100101; i <= 100108; i++)
                    {
                        //添加农机手的技能信息及星星数
                        skillmodel = new T_USER_ROLE_DEMANDTYPELEVEL_RELATION {
                            UserId = model.Id, RoleId = (int)RoleType.MachineryOperator, DemandId = i, Star = Convert.ToInt32(demandLevelInfoList[i]), CreateTime = Utility.TimeHelper.GetChinaLocalTime()
                        };
                        if (demandLevelInfoList[i] > 0)
                        {
                            //先删除原有记录
                            var dbEntry = dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.SingleOrDefault(u => u.UserId == skillmodel.UserId && u.RoleId == skillmodel.RoleId && u.DemandId == skillmodel.DemandId);
                            if (dbEntry != null)
                            {
                                dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Remove(dbEntry);
                                dbContext.SaveChanges();
                            }
                            //执行添加操作
                            dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Add(skillmodel);
                            dbContext.SaveChanges();
                        }
                        else
                        {
                            //删除原有记录
                            var dbEntry = dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.SingleOrDefault(u => u.UserId == skillmodel.UserId && u.RoleId == skillmodel.RoleId && u.DemandId == skillmodel.DemandId);
                            if (dbEntry != null)
                            {
                                dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Remove(dbEntry);
                                dbContext.SaveChanges();
                            }
                        }
                    }
                    //获取农机手角色的最大星星数
                    var operatorstarmodel = dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Where(u => u.UserId == model.Id && u.RoleId == (int)RoleType.MachineryOperator).OrderByDescending(u => u.Star).FirstOrDefault();
                    if (operatorstarmodel != null)
                    {
                        operatorstar = (byte?)operatorstarmodel.Star;
                    }
                    //产业商
                    for (int i = 100201; i <= 100202; i++)
                    {
                        //添加产业商的技能信息及星星数
                        skillmodel = new T_USER_ROLE_DEMANDTYPELEVEL_RELATION {
                            UserId = model.Id, RoleId = (int)RoleType.Business, DemandId = i, Star = Convert.ToInt32(demandLevelInfoList[i]), CreateTime = Utility.TimeHelper.GetChinaLocalTime()
                        };
                        if (demandLevelInfoList[i] > 0)
                        {               //先删除原有记录
                            var dbEntry = dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.SingleOrDefault(u => u.UserId == skillmodel.UserId && u.RoleId == skillmodel.RoleId && u.DemandId == skillmodel.DemandId);
                            if (dbEntry != null)
                            {
                                dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Remove(dbEntry);
                                dbContext.SaveChanges();
                            }
                            //执行添加操作
                            dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Add(skillmodel);
                            dbContext.SaveChanges();
                        }
                        else
                        {
                            //删除原有记录
                            var dbEntry = dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.SingleOrDefault(u => u.UserId == skillmodel.UserId && u.RoleId == skillmodel.RoleId && u.DemandId == skillmodel.DemandId);
                            if (dbEntry != null)
                            {
                                dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Remove(dbEntry);
                                dbContext.SaveChanges();
                            }
                        }
                    }
                    //获取产业商角色的最大星星数
                    var businessstarmodel = dbContext.T_USER_ROLE_DEMANDTYPELEVEL_RELATION.Where(u => u.UserId == model.Id && u.RoleId == (int)RoleType.Business).OrderByDescending(u => u.Star).FirstOrDefault();
                    if (businessstarmodel != null)
                    {
                        businesstar = (byte?)businessstarmodel.Star;
                    }
                    //2判断各角色的星星数是否大于0,大于0执行添加操作,如果之前已经存在该角色的记录信息先删除在添加,等于0执行删除操作。
                    T_USER_ROLE_RELATION rolemodel = new T_USER_ROLE_RELATION();
                    if (farmerstar >= 0)//ww增加=,否则会删除角色表的数据
                    {
                        rolemodel = new T_USER_ROLE_RELATION {
                            UserID = model.Id, MemberType = true, RoleID = (int)RoleType.Farmer, Star = farmerstar, AuditUserId = loginid, CreateTime = Utility.TimeHelper.GetChinaLocalTime()
                        };
                        //先删除原有记录
                        var dbEntry = dbContext.T_USER_ROLE_RELATION.SingleOrDefault(u => u.MemberType && u.UserID == rolemodel.UserID && u.RoleID == rolemodel.RoleID);
                        if (dbEntry != null)
                        {
                            dbContext.T_USER_ROLE_RELATION.Remove(dbEntry);
                            dbContext.SaveChanges();
                        }
                        //执行添加操作
                        dbContext.T_USER_ROLE_RELATION.Add(rolemodel);
                        dbContext.SaveChanges();
                    }
                    else
                    {
                        //删除原有记录
                        var dbEntry = dbContext.T_USER_ROLE_RELATION.SingleOrDefault(u => u.MemberType && u.UserID == model.Id && u.RoleID == (int)RoleType.Farmer);
                        if (dbEntry != null)
                        {
                            dbContext.T_USER_ROLE_RELATION.Remove(dbEntry);
                            dbContext.SaveChanges();
                        }
                    }
                    if (operatorstar > 0)
                    {
                        rolemodel = new T_USER_ROLE_RELATION {
                            UserID = model.Id, MemberType = true, RoleID = (int)RoleType.MachineryOperator, Star = operatorstar, AuditUserId = loginid, CreateTime = Utility.TimeHelper.GetChinaLocalTime()
                        };
                        //先删除原有记录
                        var dbEntry = dbContext.T_USER_ROLE_RELATION.SingleOrDefault(u => u.MemberType && u.UserID == rolemodel.UserID && u.RoleID == rolemodel.RoleID);
                        if (dbEntry != null)
                        {
                            dbContext.T_USER_ROLE_RELATION.Remove(dbEntry);
                            dbContext.SaveChanges();
                        }
                        //执行添加操作
                        dbContext.T_USER_ROLE_RELATION.Add(rolemodel);
                        dbContext.SaveChanges();
                    }
                    else
                    {
                        //删除原有记录
                        var dbEntry = dbContext.T_USER_ROLE_RELATION.SingleOrDefault(u => u.MemberType && u.UserID == model.Id && u.RoleID == (int)RoleType.MachineryOperator);
                        if (dbEntry != null)
                        {
                            dbContext.T_USER_ROLE_RELATION.Remove(dbEntry);
                            dbContext.SaveChanges();
                        }
                    }
                    if (businesstar > 0)
                    {
                        rolemodel = new T_USER_ROLE_RELATION {
                            UserID = model.Id, MemberType = true, RoleID = (int)RoleType.Business, Star = businesstar, AuditUserId = loginid, CreateTime = Utility.TimeHelper.GetChinaLocalTime()
                        };
                        //先删除原有记录
                        var dbEntry = dbContext.T_USER_ROLE_RELATION.SingleOrDefault(u => u.MemberType && u.UserID == rolemodel.UserID && u.RoleID == rolemodel.RoleID);
                        if (dbEntry != null)
                        {
                            dbContext.T_USER_ROLE_RELATION.Remove(dbEntry);
                            dbContext.SaveChanges();
                        }
                        //执行添加操作
                        dbContext.T_USER_ROLE_RELATION.Add(rolemodel);
                        dbContext.SaveChanges();
                    }
                    else
                    {
                        //删除原有记录
                        var dbEntry = dbContext.T_USER_ROLE_RELATION.SingleOrDefault(u => u.MemberType && u.UserID == model.Id && u.RoleID == (int)RoleType.Business);
                        if (dbEntry != null)
                        {
                            dbContext.T_USER_ROLE_RELATION.Remove(dbEntry);
                            dbContext.SaveChanges();
                        }
                    }
                    #endregion


                    tran.Commit();//提交事务
                    return(1);
                }
            }
        }
Beispiel #6
0
        public JsonResult Detail(Int64 UserId, int verificationId, RoleType roleId, string remoteApiUrl)
        {
            //检查访问权限
            CheckPermission();

            //非管理员时检查角色
            if (this.UserInfo.IsSuperAdmin == false)
            {
                var myRoleList = this.adminUserRepository.GetRoles(UserId);
                if (myRoleList != null && myRoleList.Count > 0)
                {
                    var isAdmin = Array.IndexOf(myRoleList.Select(role => role.RoleID).ToArray(), (int)RoleType.Admin) > -1;
                    if (!isAdmin)
                    {
                        var    suppliers_SareaModel = suppliers_SareaRespository.GetManageArea(UserId);
                        var    bo        = false;
                        object viewModel = null;
                        if (suppliers_SareaModel != null && suppliers_SareaModel.Count > 0)//判断是否有管理区域
                        {
                            switch (roleId)
                            {
                            case RoleType.Farmer:
                                var farmerVerificationInfo = this.farmerVerificationRepository.GetByKey(verificationId);
                                viewModel = new FarmerVerificationInfoViewModel();
                                ClassValueCopyHelper.Copy(viewModel, farmerVerificationInfo);
                                bo = suppliers_SareaModel.Any(model =>
                                {
                                    return(farmerVerificationInfo.Province == model.AID ||
                                           farmerVerificationInfo.City == model.AID ||
                                           farmerVerificationInfo.Region == model.AID);
                                });
                                break;

                            case RoleType.MachineryOperator:
                                var machineOperVerificationInfo = this.machineryOperatorVerificationRepository.GetByKey(verificationId);
                                viewModel = new MachineOperatorVerificationInfoViewModel();
                                ClassValueCopyHelper.Copy(viewModel, machineOperVerificationInfo);
                                bo = suppliers_SareaModel.Any(model =>
                                {
                                    return(machineOperVerificationInfo.Province == model.AID ||
                                           machineOperVerificationInfo.City == model.AID ||
                                           machineOperVerificationInfo.Region == model.AID);
                                });
                                break;

                            case RoleType.Business:
                                var businessVerificationInfo = this.businessVerificationRepository.GetByKey(verificationId);
                                viewModel = new BusinessVerificationInfoViewModel();
                                ClassValueCopyHelper.Copy(viewModel, businessVerificationInfo);
                                bo = suppliers_SareaModel.Any(model =>
                                {
                                    return(businessVerificationInfo.Province == model.AID ||
                                           businessVerificationInfo.City == model.AID ||
                                           businessVerificationInfo.Region == model.AID);
                                });
                                break;
                            }
                        }
                        if (!bo)
                        {
                            var result = new ResponseResult <FarmerVerificationInfoViewModel>();
                            result.IsSuccess = false;
                            result.Message   = "没有符合条件的数据";
                            return(Json(result));
                        }
                    }
                }
            }


            var    roleType = (RoleType)roleId;
            string viewName = string.Empty;

            switch (roleType)
            {
            case RoleType.Farmer:
                viewName = "Farmer_Detail";

                var result = new ResponseResult <FarmerVerificationInfoViewModel>();

                var farmerVerificationInfo = this.farmerVerificationRepository.GetByKey(verificationId);
                FarmerVerificationInfoViewModel viewModel = new FarmerVerificationInfoViewModel();
                viewModel.RemoteApiUrl = remoteApiUrl;
                ClassValueCopyHelper.Copy(viewModel, farmerVerificationInfo);
                //获取用户的省市区域信息

                string addressCodes     = string.Format("{0}|{1}|{2}|{3}|{4}", farmerVerificationInfo.Province, farmerVerificationInfo.City, farmerVerificationInfo.Region, farmerVerificationInfo.Township, farmerVerificationInfo.Village);
                var    addressCodeNames = this.areaRepository.GetAreaNamesBy(addressCodes).Split('|');

                viewModel.UserName      = farmerVerificationInfo.RealName;
                viewModel.PhoneNumber   = farmerVerificationInfo.PhoneNumber;
                viewModel.DetailAddress = farmerVerificationInfo.DetailAddress;
                if (addressCodeNames != null && addressCodeNames.Length == 5)
                {
                    viewModel.ProvinceName = addressCodeNames[0];
                    viewModel.CityName     = addressCodeNames[1];
                    viewModel.RegionName   = addressCodeNames[2];
                    viewModel.TownshipName = addressCodeNames[3];
                    viewModel.VillageName  = addressCodeNames[4];
                }
                result.Entity    = viewModel;
                result.IsSuccess = true;

                return(new JsonResultEx(result));

            case RoleType.MachineryOperator:
                viewName = "Machinery_Operator_Detail";

                var mresult = new ResponseResult <MachineOperatorVerificationInfoViewModel>();

                var machineryOperatorVerificationInfo = this.machineryOperatorVerificationRepository.GetByKey(verificationId);
                var operatorViewModel = new MachineOperatorVerificationInfoViewModel();
                operatorViewModel.RemoteApiUrl = remoteApiUrl;
                ClassValueCopyHelper.Copy(operatorViewModel, machineryOperatorVerificationInfo);
                //获得农机列表
                if (string.IsNullOrEmpty(machineryOperatorVerificationInfo.Machinery) == false)
                {
                    var machineList = JsonHelper.FromJsonTo <List <DuPont.Models.Models.ProductInfo> >(machineryOperatorVerificationInfo.Machinery);
                    operatorViewModel.MachineList = machineList;
                }

                //获取农机手提供的图片信息
                if (string.IsNullOrEmpty(machineryOperatorVerificationInfo.PicturesIds) == false)
                {
                    var picIdstrs = machineryOperatorVerificationInfo.PicturesIds.Split(',');
                    var picIds    = new long[picIdstrs.Length];
                    int index     = 0;
                    picIdstrs.Select(m =>
                    {
                        long fileId = 0;
                        if (long.TryParse(m, out fileId))
                        {
                            picIds[index++] = fileId;
                        }
                        return(m);
                    }).Count();

                    var fileList = this.fileInfoRepository.GetAll(m => picIds.Contains(m.Id));
                    if (fileList != null)
                    {
                        operatorViewModel.Pictures = fileList.Select(m => m.Path).ToArray();
                    }
                }
                operatorViewModel.UserName    = machineryOperatorVerificationInfo.RealName;
                operatorViewModel.PhoneNumber = machineryOperatorVerificationInfo.PhoneNumber;
                //获取省市区县信息
                var addressNames = this.areaRepository.GetAreaNamesBy(string.Format("{0}|{1}|{2}|{3}|{4}", machineryOperatorVerificationInfo.Province, machineryOperatorVerificationInfo.City, machineryOperatorVerificationInfo.Region, machineryOperatorVerificationInfo.Township, machineryOperatorVerificationInfo.Village));
                if (addressNames != null && addressNames != "")
                {
                    var addrArray = addressNames.Split('|');
                    operatorViewModel.ProvinceName = addrArray[0];
                    operatorViewModel.CityName     = addrArray[1];
                    operatorViewModel.RegionName   = addrArray[2];
                    operatorViewModel.Township     = addrArray[3];
                    operatorViewModel.Village      = addrArray[4];
                }
                operatorViewModel.DetailAddress = machineryOperatorVerificationInfo.DetailAddress;
                operatorViewModel.SkillList     = this.sysDictionaryRespository.GetAll(m => m.ParentCode == 100100).ToList();

                mresult.Entity    = operatorViewModel;
                mresult.IsSuccess = true;

                return(new JsonResultEx(mresult));

            case RoleType.Business:
                viewName = "Business_Detail";

                var bresult = new ResponseResult <BusinessVerificationInfoViewModel>();

                var businessVerificationInfo = this.businessVerificationRepository.GetByKey(verificationId);
                var businessViewModel        = new BusinessVerificationInfoViewModel();
                businessViewModel.RemoteApiUrl = remoteApiUrl;
                ClassValueCopyHelper.Copy(businessViewModel, businessVerificationInfo);

                //获取产业商提供的图片信息
                if (string.IsNullOrEmpty(businessVerificationInfo.PictureIds) == false)
                {
                    var picIdstrs = businessVerificationInfo.PictureIds.Split(',');
                    var picIds    = new long[picIdstrs.Length];
                    int index     = 0;
                    picIdstrs.Select(m =>
                    {
                        long fileId = 0;
                        if (long.TryParse(m, out fileId))
                        {
                            picIds[index++] = fileId;
                        }
                        return(m);
                    }).Count();

                    var fileList = this.fileInfoRepository.GetAll(m => picIds.Contains(m.Id));
                    if (fileList != null && fileList.Count > 0)
                    {
                        businessViewModel.Pictures = fileList.Select(m => m.Path).ToArray();
                    }
                }
                businessViewModel.UserName    = businessVerificationInfo.RealName;
                businessViewModel.PhoneNumber = businessVerificationInfo.PhoneNumber;
                //获取省市区县信息
                addressNames = this.areaRepository.GetAreaNamesBy(string.Format("{0}|{1}|{2}|{3}|{4}", businessVerificationInfo.Province, businessVerificationInfo.City, businessVerificationInfo.Region, businessVerificationInfo.Township, businessVerificationInfo.Village));
                if (addressNames != null && addressNames != "")
                {
                    var addrArray = addressNames.Split('|');
                    businessViewModel.ProvinceName = addrArray[0];
                    businessViewModel.CityName     = addrArray[1];
                    businessViewModel.RegionName   = addrArray[2];
                    businessViewModel.TownshipName = addrArray[3];
                    businessViewModel.VillageName  = addrArray[4];
                }
                businessViewModel.DetailAddress = businessVerificationInfo.DetailAddress;
                businessViewModel.SkillList     = this.sysDictionaryRespository.GetAll(m => m.ParentCode == 100200).ToList();

                bresult.Entity    = businessViewModel;
                bresult.IsSuccess = true;

                return(new JsonResultEx(bresult));
            }
            return(null);
        }
Beispiel #7
0
        /// <summary>
        /// 获取后台指定角色用户列表
        /// </summary>
        /// <param name="predicate"></param>
        /// <param name="roleType"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public List <BackgroundUserModel> GetBackgroundUserList(System.Linq.Expressions.Expression <Func <T_ADMIN_USER, bool> > predicate, RoleType roleType, int pageIndex, int pageSize, out int totalCount)
        {
            var roleTypeId = (int)roleType;

            using (var ctx = GetDbContextInstance())
            {
                List <BackgroundUserModel> backgroundUserList = null;

                if (roleType != RoleType.Unknown)
                {
                    var query = from u in ctx.Set <T_ADMIN_USER>().Where(p => !p.IsSuperAdmin).Where(predicate)
                                join userRole_RL in ctx.Set <T_USER_ROLE_RELATION>() on u.Id equals userRole_RL.UserID
                                where userRole_RL.RoleID == roleTypeId && !userRole_RL.MemberType
                                select new
                    {
                        User = u,
                        userRole_RL.RoleID
                    };

                    totalCount = query.Count();
                    var data = query.OrderByDescending(p => p.User.CreateTime)
                               .Skip((pageIndex - 1) * pageSize)
                               .Take(pageSize)
                               .ToList();

                    if (totalCount > 0)
                    {
                        backgroundUserList = new List <BackgroundUserModel>();
                        foreach (var user in data)
                        {
                            var bgUserModelItem = new BackgroundUserModel();
                            ClassValueCopyHelper.Copy(bgUserModelItem, user.User);
                            bgUserModelItem.RoleName = ((RoleType)user.RoleID).GetDescription();
                            backgroundUserList.Add(bgUserModelItem);
                        }
                    }
                }
                else
                {
                    var query = from u in ctx.Set <T_ADMIN_USER>().Where(p => !p.IsSuperAdmin).Where(predicate)
                                join userRole_RL in ctx.Set <T_USER_ROLE_RELATION>() on u.Id equals userRole_RL.UserID
                                where !userRole_RL.MemberType
                                select new
                    {
                        User = u,
                        userRole_RL.RoleID
                    };

                    totalCount = query.Count();
                    var data = query.OrderByDescending(p => p.User.CreateTime)
                               .Skip((pageIndex - 1) * pageSize)
                               .Take(pageSize)
                               .ToList();

                    if (totalCount > 0)
                    {
                        backgroundUserList = new List <BackgroundUserModel>();
                        foreach (var user in data)
                        {
                            var bgUserModelItem = new BackgroundUserModel();
                            ClassValueCopyHelper.Copy(bgUserModelItem, user.User);
                            bgUserModelItem.RoleName = ((RoleType)user.RoleID).GetDescription();
                            backgroundUserList.Add(bgUserModelItem);
                        }
                    }
                }

                return(backgroundUserList);
            }
        }