Пример #1
0
        public ActionResult JojoscarChoice(int year)
        {
            ViewBag.Year = year;
            GuestModel choix = Calculation.CalculateJojoscarChoice(GuestsBusinessCtrl.GetGuests(year));

            return(View(CommonUtils.BuildGuestViewModel(year, choix)));
        }
Пример #2
0
        public ActionResult GenerateVoteFile(int year)
        {
            ViewBag.Year = year;
            var guests = GuestsBusinessCtrl.GetGuests(year);

            FormatVotes.CreateDoc("D:\\Votes" + year + ".doc", CategoriesBusinessCtrl.GetCategoriesWithNominees(year),
                                  guests);

            return(View("Index", guests));
        }
Пример #3
0
        public ActionResult Statistics(int year)
        {
            ViewBag.Year = year;
            GuestModel        choix;
            List <GuestModel> stats;

            Calculation.CalculateStats(out choix, out stats, GuestsBusinessCtrl.GetGuests(year));

            return(View(CommonUtils.BuildStatisticViewModel(year, stats)));
        }
Пример #4
0
        private List <ResultModel> GetResults(int year, bool excludeNotEligibleForMoney)
        {
            List <ResultModel> results;

            var categories = CategoriesBusinessCtrl.GetCategories(year);

            var    guests        = GuestsBusinessCtrl.GetGuests(year);
            double amountToShare = Calculation.CalculateAmmountToShare(guests, categories);

            Calculation.CalculateResults(guests, categories, GetPercents(), out results, excludeNotEligibleForMoney);

            return(results);
        }
Пример #5
0
 // GET: Guest
 public ActionResult Index(int year)
 {
     ViewBag.Year = year;
     return(View(GuestsBusinessCtrl.GetGuests(year)));
 }