Exemplo n.º 1
0
        public override string ToHtmlString()
        {
            var clients = clientService.GetActiveClients();

            if (this._displayCount.HasValue && _displayCount.Value > 0)
            {
                clients = clients.Take(this._displayCount.Value);
            }

            foreach (var item in clients)
            {
                this.Component.Items.Add(
                    new ClientTestimonialsItem()
                {
                    ClientLogoUrl    = mediaStorageService.GetPictureUrl(item.ClientLogoId),
                    PersonPictureUrl = mediaStorageService.GetPictureUrl(item.PersonPictureId),
                    ClientName       = item.ClientName,
                    WhatSayAboutUs   = item.WhatSayAboutUs,
                    PersonName       = item.PersonName,
                    PersonPosition   = item.PersonPosition,
                    WebsiteUrl       = item.Website,
                    Star             = item.Star
                });
            }

            return(base.ToHtmlString());
        }