public ActionResult Login(LoginViewModel _loginUser) { /* * string password = "******"; * string _salt = string.Empty; * string _password = string.Empty; * CommonFunctions.GeneratePassword(password, "new", ref _salt, ref _password); */ Users rUser = new Repository.Users(); if (rUser.Login(_loginUser)) { LoginInfo.CreateAdminLoginSession(rUser.UserObj.ServiceFirstID, "", rUser.UserObj.ServiceFirstUserName, rUser.UserObj.ServiceFirstPassword, rUser.UserObj.ServiceFirstUserName, rUser.UserObj.ServiceFirstUserName, "SuperAdmin" , _loginUser.RememberMe, _loginUser.Salt); return(RedirectToAction("CompanyList")); } else { TempData["message"] = rUser.Message; return(View()); } }