예제 #1
0
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            bool bValidar = UtlAuditoria.ValidarSession();

            if (bValidar)
            {
                filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { controller = "usuario", action = "login" }));
            }
            base.OnActionExecuting(filterContext);
        }
예제 #2
0
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            bool bValidar = UtlAuditoria.ValidarSession();

            if (bValidar)
            {
                filterContext.Result = new JsonResult
                {
                    Data = new { iTipoResultado = -5, message = "error" },
                    JsonRequestBehavior = JsonRequestBehavior.DenyGet
                };
            }
            base.OnActionExecuting(filterContext);
        }