Exemple #1
0
        // GET: Games/Edit/5
        public ActionResult Edit(int?id)
        {
            Game game = null;

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            try
            {
                game = GameManager.RetrieveGame(id.Value);
            }
            catch (Exception)
            {
                return(HttpNotFound());
            }
            _gameInEdit = game;

            try
            {
                ViewBag.Consoles   = ConsoleManager.RetrieveConsoles();
                ViewBag.Developers = DeveloperManager.RetrieveDevelopers();
                ViewBag.Publishers = PublisherManager.RetrievePublishers();
            }
            catch (Exception)
            {
            }

            return(View(game));
        }
Exemple #2
0
        // GET: Games/Create
        public ActionResult Create()
        {
            try
            {
                ViewBag.Consoles   = ConsoleManager.RetrieveConsoles();
                ViewBag.Developers = DeveloperManager.RetrieveDevelopers();
                ViewBag.Publishers = PublisherManager.RetrievePublishers();
            }
            catch (Exception)
            {
            }

            return(View());
        }
        static void Main(string[] args)
        {
            //    List<ESRB> esrb = ESRBManager.GetESRBList();
            //    foreach (ESRB c in esrb)
            //    {
            //        Console.WriteLine(c.Rating);
            //    }

            //}
            Console.Write("Enter a DeveloperID: ");
            string DeveloperID = Console.ReadLine();

            Developer c = DeveloperManager.GetDeveloper(int.Parse(DeveloperID));

            if (c != null)
            {
                Console.WriteLine(c.Name);
            }
            else
            {
                Console.WriteLine("Developer ID not Found");
            }
        }