Esempio n. 1
0
        public async Task <IActionResult> Create([Bind("Number,TimeStamp,Fullservice,Signupdate,Firstname,Lastname,Primarycontact,Phonenumber,Alternatephonenumber,Alternatephonenumber2,Email,Alternateemail,Address,City,State,Zip,Membernumber,Viplevel,Points,Expiration,Yearofuse,Rcimembernumber,Rcipoints,Rciyearofuse,Rateofpay,Username,Password,Rci1,Rci2,Guestpasses,Reservationpasses,Wynresemail")] Owners owners)
        {
            if (ModelState.IsValid)
            {
                _context.Add(owners);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(owners));
        }
Esempio n. 2
0
        public async Task <IActionResult> Create([Bind("TimeStamp,Name,Note,Reason,Number")] Notes notes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(notes);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Number"] = new SelectList(_context.Owners, "Number", "Number", notes.Number);
            return(View(notes));
        }
Esempio n. 3
0
        public async Task <IActionResult> Create(int id, [Bind("TimeStamp,Source,Primaryguestname,Numberofoccupants,Property,Unittype,Datebookingmade,Checkin,Checkout,Number,Baserateofpay,Rci,Tri,Pointsused,Reservationpassesneeded,Reservationpassespurchased,Guestpassesadded,Guestpassespurchased,Wyndhamconfirmationnumber")] Bookings bookings)
        {
            ViewData["Owner"] = id;
            int ownerNum = id;

            if (ModelState.IsValid)
            {
                _context.Add(bookings);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { id = ownerNum }));
            }
            ViewData["Number"] = new SelectList(_context.Owners, "Number", "Number", bookings.Number);
            return(View(bookings));
        }