Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: Coding Logic Problem

date posted 7th July 2007 21:15

STOP SENDING ME MESSAGES I DONT KNOW WHO YOU ARE BUT PLEASE! IVE ALREADY
ASKED NICELY AND U KEEP SENDING THIS!


>From: [EMAIL REMOVED]
>Reply-To: [EMAIL REMOVED]
>To: "FN-FORUM / [EMAIL REMOVED]
[EMAIL REMOVED]
>Subject: RE: FN-FORUM: Coding Logic Problem
>Date: 7 Jul 2007 20:11:40 -0000
>
>
>(I've not replied to the forum before, preferring to lurk :-), so apologies
>if this goes awry)
>
>Hi,
> On a first look only, I think I'd have things like
>
>accommodation, and its specific details, including type
>
>accomodationType, and, say, its price
>
>customers
>
>bookings
>id, accomId, customerId, start, end
>
>the most useful table could be something like
>accomodationBookings
>accomid, bookingID, dateBooked
>and fill this with the 7,14, whatever, daydates the accom is booked (as in
>when an entry is put into bookings and even though they should always be in
>blocks of 7 - at least you can pick up, say, the first 3 days of a month
>even if they are the last three days of a booking). Then you can select all
>the dates it's booked within your display range and use that to colour your
>table. So, a new accom would have no entries, past or future. This table
>would save you having to recalc everything from bookings every time you
>display the table.
>
>As I say, first look only. I'd want to see their 'business rules' before I
>really started coming up with tables and so on.
>
>Cheers,
>
>Richard Tait
>
>
>
>-----Original Message-----
>From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Colin
>Shipton
>Sent: 07 July 2007 17:26
>To: FN-FORUM / [EMAIL REMOVED]
>Subject: FN-FORUM: Coding Logic Problem
>
>
>Afternoon Experts,
>
>I need some help with some logic which I have been banging my head against
>all day :(
>
>To give you a brief overview:
>
>A client of mine is hiring out a number of self-catering apartments on a
>weekly basis, I have created a yearly calendar split into the separate
>months and I have created 3 tables:
>
>CREATE TABLE [dbo].[accomodation](
> [id] [int] IDENTITY(1,1) PRIMARY KEY,
> [accomodation_name] [varchar](50)
>)
>
>CREATE TABLE [dbo].[price](
> [id] [int] IDENTITY(1,1) PRIMARY KEY,
> [accomodation_id] [int] NOT NULL,
> [year_number] [int] NOT NULL,
> [week_number] [tinyint] NOT NULL,
> [price_week] [money] NULL
>)
>
>CREATE TABLE [dbo].[booking](
> [id] [int] IDENTITY(1,1) NOT NULL,
> [accomodation_id] [int] NOT NULL,
> [date_start] [datetime] NOT NULL,
> [date_end] [datetime] NOT NULL
>)
>
>I have worked out the relevant logic to calculate the week numbers based
>upon the start and end dates of the booking, but what I can't work out is
>how to cater for multiple apartments where there may or may not be a
>booking
>plus the price for the apartment, just to give a further details
>
>There are 3 apartments with different prices for each apartment, on each
>day
>of the calendar I want to change the background of the cell depending upon
>whether each apartment has a booking or not, I have worked out the logic
>for
>whether there is a booking or not, but I can't work out the logic for
>whether each apartment has a booking or not, I don't want to hardcode
>variables etc. as I was this to be flexible as they will probably be buying
>more properties.
>
>I hope this makes sense, please feel free to ask any questions.
>
>Thanks in advance
>
>Colin
>
>
>
>
>
>--
>Freelancers, contractors earn more with Prosperity4
>Call 0870 870 4414 or visit www.prosperity4.com
>and benefit from Inland Revenue approved expenses today.
>
>To advertise here: http://www.freelancers.net/advertising.html
>
>
>--
>Freelancers, contractors earn more with Prosperity4
>Call 0870 870 4414 or visit www.prosperity4.com
>and benefit from Inland Revenue approved expenses today.
>
>To advertise here: http://www.freelancers.net/advertising.html
>
>



Messages by Day
July 31st 2007
July 30th 2007
July 29th 2007
July 28th 2007
July 27th 2007
July 26th 2007
July 25th 2007
July 24th 2007
July 23rd 2007
July 22nd 2007
July 21st 2007
July 20th 2007
July 19th 2007
July 18th 2007
July 17th 2007
July 16th 2007
July 15th 2007
July 14th 2007
July 13th 2007
July 12th 2007
July 11th 2007
July 10th 2007
July 9th 2007
July 8th 2007
July 7th 2007
July 6th 2007
July 5th 2007
July 4th 2007
July 3rd 2007
July 2nd 2007
July 1st 2007


Messages by Month
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000