Ejemplo n.º 1
0
        private CancelledBooking CancelledBooking(Booking booking)
        {
            var cancelledBooking = new CancelledBooking
            {
                BookingId   = booking.Id,
                User        = booking.User,
                CancelledAt = DateTime.Now
            };

            return(cancelledBooking);
        }
        public void viewCancelledBooking()
        {
            sports        = new SportsAllEntities();
            cancelledBook = new CancelledBooking();
            var cancelledBooking = from y in sports.CancelledBookings
                                   select y;
            ViewBooking vb = new ViewBooking("Cancel");

            vb.collectList = cancelledBooking.ToList <CancelledBooking>();
            vb.ShowDialog();
        }
Ejemplo n.º 3
0
        private async Task CancelBookingInsertionAsync(CancelledBooking cancelledBooking)
        {
            _context.Add(cancelledBooking);

            await _context.SaveChangesAsync();
        }