Hi! I am a novice programmer, trying to start a reservation system in ASP.NET.. Can someone guide me how can i store the booking information for a date range? This is basically for me to help check availability.. is there any opensource guide or help? Thanks in advance regards
Here's a good code sample of a booking calendar programmed in ASP.NET which should help you get started: http://www.codeguru.com/csharp/.net/net_asp/controls/article.php/c12235/
Store the from and to date along with the reservation, then check for resources ( hotel rooms, flights, ... ) that are available between those two dates.
table structure booking_table: _________ booking id arrivedate enddate guestid totalpaid link_BookingRoom: roomid bookingid guestid room_table: roomid roomtype description rate maxpeople This is how the table structure looks like.. by the way, i am also trying something like selecting all dates between the range and putting them in a dataset, below is the code which i am trying.. please can someone help me get it working? Thanks DateTime d1 = DatePicker1.SelectedDate.Value; DateTime d2 = DatePicker2.SelectedDate.Value; DataSet dsinternal = new DataSet(); dsinternal.Tables.Add("mydates"); dsinternal.Tables["mydates"].Columns.Add("dselect"); DataRow rownew = dsinternal.Tables["mydates"].NewRow(); while (d1.Date.ToShortDateString() != d2.Date.ToShortDateString()) { rownew["dselect"] = d1.Date.ToShortDateString(); dsinternal.Tables["mydates"].Rows.Add(rownew); d1.AddDays(1); } ListBox1.DataSource = dsinternal.Tables["mydates"]; ListBox1.DataTextField = "dselect"; this.DataBind(); Code (markup): Please guide.. Thanks in advance regards