Home > Forum > General > Reservation system

Reservation system
0

Hello Everyone
I have a question and also a request. Does anyone have an idea if it is possible and how to make a reservation system?
Thank you in advance for your help

In reply to: Paweł Tołoczko

Not enough input data ...

BTW:
did you try
https://community.webcon.com/online-store/app/car/3
?

Hi
I need something like this:
I have 4 places: M_1, M_2, M_3, M_4,
I need the user to be able to make a reservation for any free place.
So: I enter the date and the system checks which place is free on a given day and then I can reserve it. And when the reservation date ends, the place remains free.
Can you help me?
Thanks in advance

In reply to: User

Hi
I need something like this:
I have 4 places: M_1, M_2, M_3, M_4,
I need the user to be able to make a reservation for any free place.
So: I enter the date and the system checks which place is free on a given day and then I can reserve it. And when the reservation date ends, the place remains free.
Can you help me?
Thanks in advance

Hi,
after selecting the dates, you can limit the list of places to only those that are available in the specified range (i.e. have no reservations made).

the query could look something like this:

SELECT dbo.clearwfelem([column "Miejsce parkingowe"])
FROM WFElements as places
WHERE
places.WFD_DTYPEID = {DT:places}
AND NOT EXISTS (
SELECT 1
FROM WFElement as reservation
WHERE
reservation.WFD_DTYPEID = {DT:reservation}
AND dbo.clearwfelemid( reservation.[column "Miejsce parkingowe"] )= places.[place id]
AND reservation.end_date >= [new reservation start date]
AND reservation.start_date <= [new reservation end date] )

Of course, this query needs to be adapted to your process (e.g. I don't know how you have your places dictionary made) and you can also add a condition that the reservation should be approved (not canceled, etc.).

Additionally, you need to validate the "Zarezerwuj" path because someone could have made the same reservation in the meantime.


Regards

In reply to: User

Cześć
Niestety nie działa mi to za bardzo :).
Mam takie założenia:
Mam do wyboru 4 miejsca postojowe: M1, M2, M3, M4 i dla każdego miejsca jest status wolny lub zajęty. Pytanie jak mam zrobić walidację która sprawdzi czy dla wybranego miejsca i wskazanej daty jest wolny status rezerwacji.
Zrobiłem coś takiego ale nie działa:

The rule that you showed below uses the information from the form directly. To walidate you need to get information already saved in database. You need do add action with SQL on the path. The action has to take range of dates and places as conditions in your SQL. Notice that action that walidates subelements not always works on path, so you may need to save the list firstly. One of the ways is that You can do this for example by adding branch on your path. Additionally you can add SQL row attribute on the form to show information if certain place is free or not and show alert.

Probably you will need also to check every single day in that range. You can do that by joing with dbo.calendars, so tha you will be able to get the list of days from your range and chec for instance if the day is a working day.