private bool IsAttractionReserved(int attrId)
        {
            int?userId = AuthorizeUtil.GetUserId(service, User);

            if (userId == null)
            {
                return(false);
            }
            tKlient client = service.GetClientWithPersons(userId.Value);

            return(service.IsAttractionReserved(attrId, client.tOsoby.First().IDOsoby, userId.Value));
        }
예제 #2
0
        public void ReserveAttraction()
        {
            service.ClearReservationTables();
            service.Save();

            bool actual = service.IsAttractionReserved(1, 1, 1);

            Assert.IsFalse(actual);

            service.ReserveOffer(19, 1, 1);
            // Reserve attraction
            service.ReserveAttraction(1, 1, 1);
            actual = service.IsAttractionReserved(1, 1, 1);
            Assert.IsTrue(actual);
        }
        private bool IsAttractionReserved(int attractionId)
        {
            int?clientId = service.GetClientId(User.Identity.Name);

            return(service.IsAttractionReserved(attractionId, clientId));
        }