Пример #1
0
        // GET: Booking
        public ActionResult Index()
        {
            int?userId = (int?)Session[Global.UserIdSessionVar];

            if (userId != null)
            {
                IEnumerable <Booking> res = _bookingFacade.FindByCustomerId((int)userId);

                return(View(res.Select(b => CreateBookingVMFromDto(b))));
            }

            return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
        }
Пример #2
0
 private async Task GetValues()
 {
     bookings = await _bookingFacade.FindByCustomerId(GenericFacade.UserId);
 }