Ejemplo n.º 1
0
 public ActionResult CancelResearch(ResearchingViewModel vmR)
 {
     Manager manager = new Manager();
     Manager.CancelResearch(vmR.Id);
     TempData["Cancel"] = "Research cancelled.";
     ModelState.Clear();
     return RedirectToAction("CurrentResearching");
 }
Ejemplo n.º 2
0
        public ActionResult BuildSomething(BuildingViewModel bvm)
        {
            Manager manager = new Manager();

            bool started = false;
            started = Manager.StartConstruction(bvm.Id);
            if (started)
            {
                TempData["Response"] = "Your construction is started.";
                ViewBag.Message = "Your construction is started.";
            }
            else
            {
                TempData["Response"] = "You can't make more than " + Manager.MAX_PARALLEL_CONSTRUCTIONS + " buildings.";
            }
            return RedirectToAction("Building");
        }