public UserResponse GetUserListByOrganization(UserRequest UserInfo) { UserResponse UserResponse = new UserResponse(); UserRequest UserRequest = new UserRequest(); Epi.Web.Interfaces.DataInterfaces.IOrganizationDao IOrganizationDao = new EF.EntityOrganizationDao(); Epi.Web.BLL.Organization OrgImplementation = new Epi.Web.BLL.Organization(IOrganizationDao); OrganizationBO OrganizationBO = OrgImplementation.GetOrganizationByKey(UserInfo.Organization.OrganizationKey); Epi.Web.Interfaces.DataInterfaces.IDaoFactory entityDaoFactory = new EF.EntityDaoFactory(); Epi.Web.Interfaces.DataInterfaces.IUserDao IUserDao = new EF.EntityUserDao(); Epi.Web.BLL.User Implementation = new Epi.Web.BLL.User(IUserDao); UserResponse.User = Mapper.ToUserDTO(Implementation.GetUsersByOrgId(OrganizationBO.OrganizationId)); return(UserResponse); }
public OrganizationResponse GetOrganizationUsers(OrganizationRequest request) { try { Epi.Web.BLL.User userImplementation = new Epi.Web.BLL.User(_userDao); // Transform SurveyInfo data transfer object to SurveyInfo business object OrganizationBO organization = request.Organization.ToOrganizationBO(); var response = new OrganizationResponse(); if (!ValidRequest(request, response, Validate.All)) { return(response); } List <UserBO> userBOList = userImplementation.GetUsersByOrgId(request.Organization.OrganizationId); response.OrganizationUsersList = userBOList.ToUserDTOList(); return(response); } catch (Exception ex) { throw new FaultException <CustomFaultException>(new CustomFaultException(ex)); } }