// GET: Login

        public ActionResult MainPageofIndex(ModelofLogin login1)
        {
            if (ModelState.IsValid)
            {
                bool   isAuthenticated = WebSecurity.Login(login1.Username, login1.Password, login1.Rememberme);
                string userexist       = WebSecurity.CurrentUserName;
                if (isAuthenticated && login1.Username == "Booker")
                {
                    return(RedirectToAction("Index", "ReservationEventsmain"));
                }
                else if (isAuthenticated && login1.Username == "Stocker")
                {
                    return(RedirectToAction("Index", "StocksDetail"));
                }
                else if (isAuthenticated && login1.Username == "Accounter")
                {
                    return(RedirectToAction("Index", "mainPageOf"));
                }
                else
                {
                    TempData["message"] = " Username or Password is Incorrect";
                    ModelState.AddModelError("", "Username or Password is Incorrect");
                    // return PartialView("ReservationLogin()");

                    //  return PartialView("ReservationLogin",login1);
                }
            }

            return(View());
        }
 public ActionResult AccountLogin(ModelofLogin login1)
 {
     return(View());
 }