示例#1
0
        public async Task <IActionResult> Create([Bind("Bid,BeautyName,BeautyPrice,BQty")] BeautynSpa beautynSpa)
        {
            if (ModelState.IsValid)
            {
                _context.Add(beautynSpa);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(beautynSpa));
        }
示例#2
0
        public async Task <IActionResult> Create([Bind("Hid,HotelName,HotelPrice,HDateCheckInDate,HDateCheckOutDate,HQty")] Hotel hotel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(hotel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(hotel));
        }
示例#3
0
        public async Task <IActionResult> Create([Bind("Rid,RestName,RestPrice,RDateCheckInDate,RDateCheckOutDate,RQty")] Restaurant restaurant)
        {
            if (ModelState.IsValid)
            {
                _context.Add(restaurant);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(restaurant));
        }
示例#4
0
        public async Task <IActionResult> Create([Bind("Actid,ActName,ActPrice,AQty")] Activity activity)
        {
            if (ModelState.IsValid)
            {
                _context.Add(activity);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(activity));
        }