public IEnumerable <SchoolDto> GetSchools()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.School>()
            .AddColumns(_schoolColumns)
            .ToList()
            .Select(SchoolDtoSelect));
 }
 public IEnumerable <DoctorDto> GetDoctors()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.Doctor>()
            .AddColumns(_doctorColumns)
            .ToList()
            .Select(DoctorDtoSelect));
 }
Beispiel #3
0
 public IEnumerable <ArticleDto> GetArticles()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.Article>()
            .AddColumns(_articleColumns)
            .ToList()
            .Select(ArticleDtoSelect)
            .OrderByDescending(obj => obj.DatePublished));
 }
 public IEnumerable <CompanyServiceDto> GetCompanyServices()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.CompanyService>()
            .AddColumns("Header", "Text", "Icon")
            .OrderByAscending("NodeOrder")
            .ToList()
            .Select(m => Mapper.Map <CompanyServiceDto>(m)));
 }
Beispiel #5
0
 public IEnumerable <SocialLinkDto> GetSocialLinks()
 {
     return(DocumentQueryService.GetDocuments <SocialLink>()
            .AddColumns("Title", "Url", "Icon")
            .OrderByAscending("NodeOrder")
            .ToList()
            .Select(socialLink => Mapper.Map <SocialLinkDto>(socialLink)));
 }
Beispiel #6
0
 public IEnumerable <MapLocationDto> GetOfficeLocations()
 {
     return(DocumentQueryService.GetDocuments <MapLocation>()
            .AddColumns("Longitude", "Latitude", "Tooltip")
            .OrderByAscending("NodeOrder")
            .ToList()
            .Select(mld => Mapper.Map <MapLocationDto>(mld)));
 }
 public ContactSectionDto GetContactSection()
 {
     return(DocumentQueryService.GetDocuments <ContactSection>()
            .TopN(1)
            .AddColumns("Title", "Subtitle", "Text")
            .ToList()
            .Select(cs => Mapper.Map <ContactSectionDto>(cs))
            .FirstOrDefault());
 }
 public HomeSectionDto GetHomeSection()
 {
     return(DocumentQueryService.GetDocuments <HomeSection>()
            .AddColumns("Title", "Text", "Button")
            .TopN(1)
            .ToList()
            .Select(m => Mapper.Map <HomeSectionDto>(m))
            .FirstOrDefault());
 }
 public IEnumerable <MenuItemDto> GetMenuItems()
 {
     return(DocumentQueryService.GetDocuments <MenuContainerItem>()
            .Path("/Menu-items", PathTypeEnum.Children)
            .AddColumns("Controller", "Action", "Caption")
            .OrderByAscending("NodeOrder")
            .ToList()
            .Select(mi => Mapper.Map <MenuItemDto>(mi)));
 }
Beispiel #10
0
 public DoctorSectionDto GetDoctorSection()
 {
     return(DocumentQueryService.GetDocuments <DoctorSection>()
            .AddColumns("Title")
            .TopN(1)
            .Select(m => new DoctorSectionDto()
     {
         Header = m.Title
     })
            .FirstOrDefault());
 }
 public IEnumerable <MapLocationDto> GetOfficeLocations()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.MapLocation>()
            .AddColumns("Longitude", "Latitude", "Tooltip")
            .OrderByAscending("NodeOrder")
            .Select(m => new MapLocationDto()
     {
         Latitude = m.Latitude,
         Longitude = m.Longitude,
         Tooltip = m.Tooltip
     }));
 }
Beispiel #12
0
 public IEnumerable <CompanyServiceDto> GetCompanyServices()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.CompanyService>()
            .AddColumns("Header", "Text", "Icon")
            .OrderByAscending("NodeOrder")
            .Select(m => new CompanyServiceDto()
     {
         Header = m.Header,
         Text = m.Text,
         Icon = m.Fields.Icon
     }));
 }
Beispiel #13
0
 public IEnumerable <SocialLinkDto> GetSocialLinks()
 {
     return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.SocialLink>()
            .AddColumns("Title", "Url", "Icon")
            .OrderByAscending("NodeOrder")
            .Select(m => new SocialLinkDto()
     {
         Url = m.Url,
         Title = m.Title,
         Icon = m.Fields.Icon
     }));
 }
 public ContactSectionDto GetContactSection()
 {
     return(DocumentQueryService.GetDocuments <ContactSection>()
            .TopN(1)
            .AddColumns("Title", "Subtitle", "Text")
            .Select(m => new ContactSectionDto()
     {
         Header = m.Title,
         Subheader = m.Subtitle,
         Text = m.Text,
     })
            .FirstOrDefault());
 }
 public IEnumerable <MenuItemDto> GetMenuItems()
 {
     return(DocumentQueryService.GetDocuments <MenuContainerItem>()
            .Path("/Menu-items", PathTypeEnum.Children)
            .AddColumns("Caption", "Controller", "Action")
            .OrderByAscending("NodeOrder")
            .Select(m => new MenuItemDto()
     {
         Action = m.Action,
         Caption = m.Caption,
         Controller = m.Controller
     }));
 }
Beispiel #16
0
 public HomeSectionDto GetHomeSection()
 {
     return(DocumentQueryService.GetDocuments <HomeSection>()
            .AddColumns("Title", "Text", "Button")
            .TopN(1)
            .Select(m => new HomeSectionDto()
     {
         Title = m.Title,
         Text = m.Text,
         LinkText = m.Button
     })
            .FirstOrDefault());
 }
Beispiel #17
0
        public CompanyDto GetCompany()
        {
            return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.Company>()
                   .AddColumns("CompanyName", "Street", "City", "Country", "ZipCode", "PhoneNumber", "Email")
                   .TopN(1)
                   .ToList()
                   .Select(company =>
            {
                var mapped = Mapper.Map <CompanyDto>(company);

                var(country, state) = GetCountryStateFromCompany(company);
                mapped.Country = country;
                mapped.State = state;

                return mapped;
            }).FirstOrDefault());
        }
Beispiel #18
0
        public CompanyDto GetCompany()
        {
            return(DocumentQueryService.GetDocuments <CMS.DocumentEngine.Types.MedioClinic.Company>()
                   .AddColumns("CompanyName", "Street", "City", "Country",
                               "ZipCode", "PhoneNumber", "Email")
                   .TopN(1)
                   .ToList()
                   .Select(m =>
            {
                var splitCountry = m.Country.Split(';');

                string country;
                string state = null;
                if (splitCountry.Length == 2)
                {
                    country = splitCountry[0];
                    state = splitCountry[1];
                }
                else
                {
                    country = m.Country;
                }

                return new CompanyDto()
                {
                    Name = m.CompanyName,
                    City = m.City,
                    Street = m.Street,
                    Country = country,
                    State = state,
                    Email = m.Email,
                    PhoneNumber = m.PhoneNumber,
                    ZipCode = m.ZipCode
                };
            })
                   .FirstOrDefault());
        }