Example #1
0
        public ActionResult Create([Bind(Include = "ResId,ResName,ResDesc,ResLocation")] RESTAURANT rESTAURANT)
        {
            if (ModelState.IsValid)
            {
                db.RESTAURANTs.Add(rESTAURANT);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(rESTAURANT));
        }
Example #2
0
        public ActionResult Create([Bind(Include = "PlaceId,PlaceName,PlaceDesc,PlaceDistance,PlaceLocation,BestTime,IdealStay")] PLACE pLACE)
        {
            if (ModelState.IsValid)
            {
                db.PLACEs.Add(pLACE);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pLACE));
        }
        public ActionResult Create([Bind(Include = "HotelId,HotelName,HotelDesc,HotelLocation,IdealPrice")] HOTEL hOTEL)
        {
            if (ModelState.IsValid)
            {
                db.HOTELs.Add(hOTEL);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(hOTEL));
        }
Example #4
0
        public ActionResult Create([Bind(Include = "WeatherId,PlacePlaceId,Jan,Feb,Mar,Apr,May,June,July,Aug,Sep,Oct,Nov,Dcm,WeatherDesc,WeatherAvg")] WEATHER wEATHER)
        {
            if (ModelState.IsValid)
            {
                db.WEATHERs.Add(wEATHER);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.PlacePlaceId = new SelectList(db.PLACEs, "PlaceId", "PlaceName", wEATHER.PlacePlaceId);
            return(View(wEATHER));
        }