Пример #1
0
        // room/Assign
        public ActionResult Assign()
        {
            IAllotmentDriver driver = new StudentCountBasedAllotmentDriver();

            driver.DriveAllotmentAsync(db, new BestFitRoomAllotment(), new GreedyResultOptimizer()).Wait();
            return(RedirectToAction("Index"));
        }
        public ActionResult AllocateSeniorYear()
        {
            TeacherToRoom    assignExam = new TeacherToRoom();
            IAllotmentDriver driver     = new StudentCountBasedAllotmentDriver();

            driver.DriveAllotmentAsync(db, new BestFitRoomAllotment(), new GreedyResultOptimizer()).Wait();
            assignExam.Index();
            TempData["notice"] = "Success!";
            return(RedirectToAction("Index"));
        }