// // GET: /Default1/ public ActionResult Index() { var model = new SponsorIndexModel(); var sponsors = _repository.Find <Sponsor>(); model.PlatinumSponsors = sponsors .Where(x => x.Level == SponsorshipLevel.Platinum) .Where(x => x.IsActive) .OrderBy(x => x.Name) .ToArray(); model.GoldSponsors = sponsors .Where(x => x.Level == SponsorshipLevel.Gold) .Where(x => x.IsActive) .OrderBy(x => x.Name) .ToArray(); model.InactiveSponsors = sponsors .Where(x => x.IsActive == false) .OrderBy(x => x.Level) .OrderBy(x => x.Name) .ToArray(); return(View(model)); }
// TODO: This has to go away // Event Administrators can use the edited About page to add previous sponsors if they want. public ActionResult PastSponsors() { var model = new SponsorIndexModel(); var platinumSponsors = new[] { new Sponsor() { Description = "Microsoft", IsActive = true, LogoUri = @"http://i143.photobucket.com/albums/r140/capscdev/ms-logo_bL.png", Name = "Microsoft", Level = SponsorshipLevel.Platinum }, new Sponsor() { Description = "Improving Enterprises", IsActive = true, LogoUri = @"http://i143.photobucket.com/albums/r140/capscdev/improving.jpg", Name = "Improving Enterprises", Level = SponsorshipLevel.Platinum } }; model.PlatinumSponsors = platinumSponsors; Sponsor[] goldSponsors = new[] { new Sponsor() { Description = "Oracle", IsActive = true, LogoUri = @"http://www.oracleimg.com/us/assets/oralogo-small.gif", Name = "Oracle", Level = SponsorshipLevel.Platinum }, new Sponsor() { Description = "Telerik", IsActive = true, LogoUri = @"http://i143.photobucket.com/albums/r140/capscdev/telerikLogo-web-450x180px.png", Name = "Telerik", Level = SponsorshipLevel.Platinum } }; model.GoldSponsors = goldSponsors; model.InactiveSponsors = new Sponsor[0]; return(View(model)); }