Exemplo n.º 1
0
        public ActionResult Create([Bind(Include = "ID,restName,restDes,restType,restLocLat,restLocLong")] Restaurant myRestaurant)
        {
            if (ModelState.IsValid)
            {
                dataGateway.Insert(myRestaurant);
                dataGateway.Save();
                return(RedirectToAction("Index"));
            }

            return(View(myRestaurant));
        }
        public ActionResult Create([Bind(Include = "ID,atName,atDes,atType,atLocLat,atLocLong,atTransportMode,atTransportDes")] Attraction attraction) //,myticket,myOpeningHour
        {
            if (ModelState.IsValid)

            {
                //TicketPrice tkprice = new TicketPrice();
                //TicketPrice tktype = new TicketPrice();
                //tktype.lalaTest("My Ticket", "hello");

                //   attraction.setMyTicketType(tktype);
                dataGateway.Insert(attraction);
                dataGateway.Save();
                return(RedirectToAction("Index"));
            }

            return(View(attraction));
        }