Example #1
0
        public bool CheckHeadGroup(string headId, Guid groupId)
        {
            var group = _groupRepository.GetGroupById(groupId);
            var user  = _userRepository.GetUserByAspUserId(headId);
            var data  = _dataRepository.Find(user.User_sPersonalData.Id);

            if (data.Id == group.HeadId)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
 public User_sPersonalData GetDataByAspUserId(string id)
 {
     if (id != null)
     {
         var user = _userRepository.GetUserByAspUserId(id);
         if (user != null)
         {
             var data = _persDataRepository.Find(user.PersonalDataId);
             return(data);
         }
     }
     return(null);
 }