示例#1
0
        //Added by sanjeet singh

        public ActionResult Logout()
        {
            if (_workContext.CurrentUser != null)
            {
                ExecutiveLoginHistory exeHistory = _execcutiveService.GetExecutiveHistoryByUserName(_workContext.CurrentUser.Emailid);
                _userAuthenticationService.SignOut();

                if (exeHistory != null)
                {
                    exeHistory.LogoutTime = DateTime.Now;
                    _execcutiveService.UpdateExecutiveLoginHistory(exeHistory);
                }
                TempData["From"] = "L";

                Session.Abandon();
                Session.Clear();
            }
            return(RedirectToAction("login"));
        }