Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            FormsAuthenticationTicket cookie = FormsAuthentication.Decrypt(HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName].Value);

            _reservationDao            = new ReservationDAO();
            ReservationGrid.DataSource = _reservationDao.GetReservationsByUserId(int.Parse(cookie.Name));
            ReservationGrid.DataBind();
            _userDao = new UserDao();
            foreach (GridViewRow r in ReservationGrid.Rows)
            {
                if (_reservationDao.GetReservationByReservationId(r.Cells[1].Text).Status != Status.Reserved)
                {
                    r.Cells[0].Controls.Clear();
                }
                Name.Text = _userDao.GetUserById(int.Parse(Context.User.Identity.Name)).FirstName;
            }
        }