Beispiel #1
0
        public ActionResult Headlines([Optional, DefaultParameterValue(1)]int id)
        {
            var MatchRepository = GetRepository<Match>();
            var repository = GetRepository<Headline>();

            var model = new CreateHeadlineModelView {
                Headlines = repository.Query().GetHeadlinePage(30, id),
                HeadlineCount = repository.All().Count(),
                HeadlineCurrentPage = id,
                MatchResults = MatchRepository.Query().GetRecentResultsWithProspects(10).Select(x => new ResultSummary(x)).ToArray(),
                NextMatches = MatchRepository.Query().GetNextMatchesWithAProspect(10),
            };
            return View(model);
        }
Beispiel #2
0
        public ActionResult AddHeadline()
        {
            var BoxerRepository = GetRepository<Boxer>();
            var Headline = new Headline();
            Headline.Date = DateTime.Now;

            var ProspectsDropdownlist = new Dictionary<int, string>();
            ProspectsDropdownlist.Add(0, "Please Select");
            foreach (var b in BoxerRepository.Query().IsProspect().ToList().CreateSummarys().OrderBy(x => x.BoxerNameReverse))
            {
                ProspectsDropdownlist.Add(b.BoxerId, b.BoxerNameReverse);
            }

            var model = new CreateHeadlineModelView
            {
                Headline = Headline,
                Prospects = BoxerRepository.Query().IsProspect().ToList().CreateSummarys().OrderBy(x => x.BoxerNameReverse),
                DDLProspects = ProspectsDropdownlist
            };

            return View(model);
        }
Beispiel #3
0
 public ActionResult Headlines([Optional, DefaultParameterValue(1)]int id)
 {
     var repository = GetRepository<Headline>();
     var model = new CreateHeadlineModelView
     {
         Headlines = repository.Query().GetHeadlinePage(30, id),
         HeadlineCount = repository.All().Count(),
         HeadlineCurrentPage = id
     };
     return View(model);
 }