Esempio n. 1
0
        public ProfilePageModel GetOrganisation(int id)
        {
            List <OrganisationSurveyModel> surveys = new List <OrganisationSurveyModel>();
            var list = _sr.GetAllSurveysFromOrganisation(id);

            foreach (var item in list)
            {
                OrganisationSurveyModel survey = new OrganisationSurveyModel
                {
                    ID    = item.ID,
                    Title = item.Title
                };
                surveys.Add(survey);
            }

            var organisation             = _or.Get(id);
            ProfilePageModel profilePage = new ProfilePageModel
            {
                Name  = organisation.Name,
                Email = organisation.Email,
                Count = _sr.CountSurveyFromOrganisation(id),
                OrganisationSurvey = surveys
            };

            return(profilePage);
        }