预订 [英] reservations

查看:54
本文介绍了预订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

被要求创建一个应用程序来保存马业务的记录。

只需了解它所需要的内容。大多数是直截了当的。


需要创建一个例程来处理预订。有些东西,比如你的马的一个盒子

将是一周。其他人,比如使用竞技场的时间将是

。关于这样做的简洁方法的任何想法。

TIA

David B

赫克瑟姆英国

解决方案

" David B" <哒*** @ marleycotenospam.fsnet.co.uk>在消息新闻中写道:< bm ********** @ news6.svr.pol.co.uk> ...

被要求创建一个应用程序来保存记录马业务。
只需要了解它所需要的东西。大多数是直截了当的。

需要创建一个例程来处理预订。有些东西,比如你的马的盒子,将会是一周。其他人,比如竞技场的使用将在一小时之内完成。关于这样做的简洁方法的任何想法。
TIA
大卫B
赫克瑟姆英国




见Albert Kallal的笔记在你开始之前。我曾经做过一次这样的事情

,如果你没有使用它就足以扭曲你的大脑

。如果我没记错的话,逻辑就是内心深处。这些笔记

在他的网页上。我想你只需用

a开始日期/时间和结束日期/时间创建预订记录,然后使用逻辑

确定何时有空位。


最简单的方法是以编程方式为每个

期间创建一个记录。在预订中。对于马来说,每个日期的记录将是

最佳方法。对于竞技场来说,这将是每小时的记录。理解这个最小粒度(日或小时)非常重要,这很难在以后很难改变,所以确保所有者*从不*想要做一半

小时预订(例如)。


一旦每个期间都有记录。在预订中,它非常简单地查询期间,列出它们,申请费用等等。

创建它们的代码是一个VBA循环,例如:使用AddNew方法(DAO)。


另一种选择是完全灵活的预订,一个人可以在任何时段/小时和部分时间内取出
。这要查询复杂得多,需要做更多的工作。如果您需要

考虑这个选项,那么本文中有关于如何找到冲突事件的起点


http://allenbrowne.com/appevent.html

请注意,这篇文章是如果你选择第一个选项

(固定粒度)则不相关。


-

Allen Browne - 微软MVP。西澳大利亚州珀斯。

访问用户提示 - http:// allenbrowne.com/tips.html


" David B" <哒*** @ marleycotenospam.fsnet.co.uk>在消息中写道

新闻:bm ********** @ news6.svr.pol.co.uk ...

被要求创建一个应用程序,以保持马业务的记录。
只是让我的头围绕它需要的东西。大多数是直截了当的。

需要创建一个例程来处理预订。有些东西,比如你的马的
盒子,将会是一周。其他人,比如使用竞技场将按小时计算
。关于这样做的简洁方法的任何想法。
TIA
大卫B
赫克瑟姆英国



一些事情。 (我写了很多预订系统)。


抵制创造空白的诱惑时间段的记录。


所以,你当然可以并且将建立一个马盒子表。


但是,要预订这些框,只需创建一个开头

时间/日期和结束时间/日期的记录。这样,你可以预订一个小时,

或整整一周进入一个记录的盒子(使用时间字段表示

开始,结束) 。


为防止重叠,您只需使用

查询测试记录中的冲突。


In我的老类型预订系统通常会创建一大堆

时隙。这需要大量的代码。


只需在*预订时添加记录*,就可以节省大量的代码,因为

你不需要我必须尝试更新一堆插槽。


您还阅读了我的一些笔记,并且还在结尾处显示了一个图表

文章。

http: //www.attcanada.net/%7ekallal.m...000000003.html

-

Albert D. Kallal(MVP)
加拿大艾伯塔省埃德蒙顿
ka****@msn.com
http://www.attcanada.net/~kallal.msn

Been asked to create an app to keep records for a horse business.
Just getting my head round what it needs. Most is straight forward.

Need to create a routine to deal with reservations. Some things, like a box
for your horse will be by the week. Others, such as use of the arena will be by
the hour. Any thoughts on the neat ways of doing this.
TIA
David B
Hexham UK

解决方案

"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message news:<bm**********@news6.svr.pol.co.uk>...

Been asked to create an app to keep records for a horse business.
Just getting my head round what it needs. Most is straight forward.

Need to create a routine to deal with reservations. Some things, like a box
for your horse will be by the week. Others, such as use of the arena will be by
the hour. Any thoughts on the neat ways of doing this.
TIA
David B
Hexham UK



See Albert Kallal''s notes on this before you start. I did something
like this once, and it''s enough to warp your brain if you''re not used
to it. If I remember right, the logic is kinda inside out. The notes
are on his web page. I think you just create reservation records with
a start date/time and and end date/time and then use logic to
determine when you have available slots.


The simplest way to do this is to programatically create a record for each
"period" in the booking. For the horse, a record for each date would be the
best approach. For the arena it would be a record for each hour. It''s really
important to understand that this minimum granularity (day or hour) is very
difficult to change later, so make sure the owner *never* wants to do half
hour bookings (for example).

Once there is a record for each "period" within the booking, it''s quite
simple to query the periods, list them, apply charges, etc. The code to
create them is a VBA loop, e.g. using the AddNew method (DAO).

The other alternative is completely flexible bookings where a person can
take out any period of day/hours and parts of. This is considerably more
complex to query, and would take more work to achieve. If you need to
consider this option, there''s a starter on how to locate the clashing events
in this article:
http://allenbrowne.com/appevent.html
Note that this article is not relevant if you go with the first option
(fixed granularity).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:bm**********@news6.svr.pol.co.uk...

Been asked to create an app to keep records for a horse business.
Just getting my head round what it needs. Most is straight forward.

Need to create a routine to deal with reservations. Some things, like a box for your horse will be by the week. Others, such as use of the arena will be by the hour. Any thoughts on the neat ways of doing this.
TIA
David B
Hexham UK



A few things. (I have written quite a few reservation systems).

Resist the temptation to create "blank" records for the time slots.

So, you most certainly can and will build a table of "horse boxes".

However, to book into those boxes, simply create a record with the start
time/date, and the end time/date. That way, you can book for just one hour,
or a whole week into that box with one record (use a timedate field for the
start, and the end).

To prevent overlaps, you simply test for collisions in the records with a
query.

In my "old" type reservation systems one would often create a whole bunch of
time slots. This take tons of code.

By just adding a record *when* you make a booking, you save tons of code, as
you don''t have to try and update a bunch of slots.

You also read some notes of mine, and I also show a er diagram at the end of
the article.

http://www.attcanada.net/%7ekallal.m...000000003.html
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn


这篇关于预订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆