protected override void OnActionExecuting(ActionExecutingContext filterContext) { //删除登录状态 BLL.DB_Session bll_Session = new BLL.DB_Session(); bll_Session.DelOutTime(); bll_Session.Close(); //user = BLL.Fun.Current_Login_DB_User(); //if (user == null) //{ // filterContext.Result = this.RedirectToAction("Index", "Main"); //} base.OnActionExecuting(filterContext); }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { BLL.DB_Session bll_Session = new BLL.DB_Session(); bll_Session.DelOutTime(); bll_Session.Close(); model_pager = LoadConfig("member"); model_pager.IDictUserModel = new Dictionary <string, NModel.DB_User>(); var user = BLL.Fun.Current_Login_DB_User(); //用户是否登录 if (user == null) { filterContext.Result = this.RedirectToAction("login", "mlcq"); } base.OnActionExecuting(filterContext); }