public void ReserveOffer() { service.ClearReservationTables(); service.Save(); bool actual = service.IsOfferReserved(1, 1, 1); Assert.IsFalse(actual); // Reserve attraction service.ReserveOffer(1, 1, 1); actual = service.IsOfferReserved(1, 1, 1); Assert.IsTrue(actual); }
protected bool IsOfferReserved(int aid) { int?offerId = service.GetOfferIdByAttractionId(aid); if (offerId.HasValue && User.Identity.IsAuthenticated) { return(service.IsOfferReserved(offerId.Value, service.GetClientId(User.Identity.Name))); } return(false); }
private bool IsOfferReserved(int offerId) { return(service.IsOfferReserved(offerId, AuthorizeUtil.GetUserId(service, User))); }
private void ConfigureViewBag(tAtrakcjeUslugi attraction, int?userId) { ViewBag.CanReserve = service.IsOfferReserved(attraction.IDOferty, userId); ViewBag.IsReserved = IsAttractionReserved(attraction.IDAtrakcjiUslugi); }