//Adds admin account, sessions username and redirects to landing page
        //Queries db to do so
        protected void Register(object sender, EventArgs e)
        {
            string username = adminUsername.Text;
            string password = adminPassReg.Text;
            string email    = adminEmail.Text;

            BusinessLogic.AddAdmin(username, password, email);
            Session.Add("username", username);
            Response.Redirect("~/UserLayer/AdminLanding.aspx");
        }
        public ActionResult AddAdminToDatabase(Admin admin)
        {
            if (admin == null)
            {
                RedirectToAction("AddAdmin", "AdminAccess");
            }

            BusinessLogic logic = new BusinessLogic();

            logic.AddAdmin(admin);
            return(RedirectToAction("LoggedIndex", "Main", new { isLogged = true }));
        }