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); } }
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); }