Esempio n. 1
0
        public async Task <IActionResult> Edit(int id, [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 (id != owners.Number)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(owners);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!OwnersExists(owners.Number))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(owners));
        }
Esempio n. 2
0
        public async Task <IActionResult> Edit(DateTime id, int num, [Bind("TimeStamp,Source,Primaryguestname,Numberofoccupants,Property,Unittype,Datebookingmade,Checkin,Checkout,Number,Baserateofpay,Rci,Tri,Pointsused,Reservationpassesneeded,Reservationpassespurchased,Guestpassesadded,Guestpassespurchased,Wyndhamconfirmationnumber")] Bookings bookings)
        {
            if (id != bookings.TimeStamp)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bookings);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BookingsExists(bookings.TimeStamp))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), new { id = num }));
            }
            ViewData["Number"] = new SelectList(_context.Owners, "Number", "Number", bookings.Number);
            return(View(bookings));
        }
Esempio n. 3
0
        public async Task <IActionResult> Edit(DateTime id, [Bind("TimeStamp,Name,Note,Reason,Number")] Notes notes)
        {
            if (id != notes.TimeStamp)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(notes);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NotesExists(notes.TimeStamp))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Number"] = new SelectList(_context.Owners, "Number", "Number", notes.Number);
            return(View(notes));
        }