Hotel Room Booking with Room Status - Update (ASP.NET, C#, VB, SQL Server)

The hotel room reservation tutorial was updated with new features: SQL Server database, CSS styling, visual room status, reservation payment status. C# and VB source code available for download.
Sep 17, 2013
hotel reservation csharp vb sql

The Hotel Room Booking tutorial was updated.

New features:

Feature summary:

  • Reservation Status (New/Confirmed/Arrived/Checked Out)
  • Reservation Change Rules
  • User Notifications
  • Room Filtering (by Size)
  • Modal Dialog for Reservation Editing
  • Includes C# and VB.NET source code (downloadable Visual Studio solution).
  • Supports .NET Framework 4.0 or higher.
  • Supports Visual Studio 2010 or higher.


You can download the sample project with C# and VB source code.

Online Demo

Test the tutorial project in an online demo.

Example: Room Status

The Scheduler control displays three columns (Room, Size, Status):

      <DayPilot:RowHeaderColumn Title="Room" Width="80" />
      <DayPilot:RowHeaderColumn Title="Size" Width="80" />
      <DayPilot:RowHeaderColumn Title="Status" Width="80" />

The status is set using BeforeResHeaderRender event handler and custom CSS classes:


protected void DayPilotScheduler1_BeforeResHeaderRender(object sender, BeforeResHeaderRenderEventArgs e)
  string status = (string)e.DataItem["RoomStatus"];
  switch (status)
      case "Dirty":
          e.CssClass = "status_dirty";
      case "Cleanup":
          e.CssClass = "status_cleanup";


Protected Sub DayPilotScheduler1_BeforeResHeaderRender(ByVal sender As Object, ByVal e As BeforeResHeaderRenderEventArgs)
  Dim status As String = CStr(e.DataItem("RoomStatus"))
  Select Case status
    Case "Dirty"
      e.CssClass = "status_dirty"
    Case "Cleanup"
      e.CssClass = "status_cleanup"
  End Select
End Sub