private void loadPage(object sender, EventArgs e) { //check if the user is loged out cookie = Request.Cookies["CheveuxUserID"]; if (cookie == null) { //if the user is not loged in as a manager do not display Bussines setting } else if (cookie["UT"] != "M") { Response.Redirect("../Default.aspx"); } else if (cookie["UT"] == "M") { #region stats //load stats ManagerStats stats = handler.GetManagerStats(); //display stats lStats1.Text = "R" + Math.Round(stats.sales, 2).ToString(); lStats2.Text = stats.upcomingBookings.ToString(); lStats3.Text = stats.totalBookings.ToString(); lStats4.Text = stats.registeredCustomers.ToString(); #endregion //if the user is loged in as a manager display the dashboard LogedIn.Visible = true; LogedOut.Visible = false; //display the headings string wB = Request.QueryString["WB"]; if (wB == "True") { Welcome.Text = "Welcome Back " + handler.GetUserDetails(cookie["ID"]).FirstName; } lJumbotronDate.Text = DateTime.Today.ToString("D"); //check for any alerts //low stock alert checkForLowStock(); //load to days bookings loadTodaysBookings(); //load outstanding stook oders loadOutOrders(); } }