protected void Page_Load(object sender, EventArgs e)
        {
            int roomID;

            RoomHandler roomHandler = new RoomHandler();
            Room room = new Room();

            roomID = int.Parse(Request.QueryString["id"]);

            room = roomHandler.GetRoomDetails(roomID);

            if (room.WifiStatus == null || room.WifiStatus == "")
                room.WifiStatus = "No";
            if (room.AirconStatus == null || room.AirconStatus == "")
                room.AirconStatus = "No";
            if (room.RoomserviceStatus == null || room.RoomserviceStatus == "")
                room.RoomserviceStatus = "No";
            if (room.TelevisionStatus == null || room.TelevisionStatus == "")
                room.TelevisionStatus = "No";

            lblRoomNo.Text = room.RoomNo;

            lblWifi.Text = room.WifiStatus;
            lblAircon.Text = room.AirconStatus;
            lblRoomservice.Text = room.RoomserviceStatus;
            lblTelevision.Text = room.TelevisionStatus;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            RoomHandler roomHandler = new RoomHandler();
            Room room = new Room();

            int roomID = Convert.ToInt32(Session["DeleteRoom"]);

            if (!Page.IsPostBack)
            {
                //get room data and populate data fields for editing
                room = roomHandler.GetRoomDetails(roomID);

                lblRoomNo.Text = room.RoomNo;
                lblDescription.Text = room.Description;
                lblRoomType.Text = room.TypeID.ToString();

                if (room.Picture != "" && room.Picture != null && room.Picture != " ")
                    litRoomPicture.Text = "<a href=\"" + room.Picture + "\"data-lightbox=\"image1\">" + room.Picture.Substring(room.Picture.LastIndexOf("\\") + 1) + "</a>";
                else
                    litRoomPicture.Text = "No picture";

            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            RoomHandler roomHandler = new RoomHandler();
            Room room = new Room();
            int roomID = Convert.ToInt32(Session["EditRoom"]);

            if (!Page.IsPostBack)
            {

                //populate typeID drop down list (dlTypeID) with every TypeID

                dlRoomType.DataSource = roomHandler.GetTypeList();
                dlRoomType.DataTextField = "Name";
                dlRoomType.DataValueField = "TypeID";
                dlRoomType.DataBind();

                //get room data and populate data fields for editing
                room = roomHandler.GetRoomDetails(roomID);

                lblRoomNo.Text = "Current picture for room " + room.RoomNo + ": ";
                txtRoomNo.Text = room.RoomNo;
                txtDescription.Text = room.Description;
                dlRoomType.SelectedValue = room.TypeID.ToString();

                if (room.WifiStatus == "Yes")
                    cbWifi.Checked = true;
                if (room.AirconStatus == "Yes")
                    cbAircon.Checked = true;
                if (room.RoomserviceStatus == "Yes")
                    cbRoomservice.Checked = true;
                if (room.TelevisionStatus == "Yes")
                    cbTelevision.Checked = true;

                dlStatus.SelectedValue = room.Status;

                if (room.Picture != "" && room.Picture != null && room.Picture != " ")
                    litRoomPicture.Text = "<a href=\"" + "." + room.Picture.Replace('\\', '/') + "\" data-lightbox=\"image\">View Picture</a>";
                else
                    litRoomPicture.Text = "No picture";

                picName = room.Picture;
                originalRoomNo = room.RoomNo;
            }
        }