
using PageAdmin.BLL;
using PageAdmin.Common;using PageAdmin.Utils.ORM;using PageAdmin.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

namespace PageAdmin.Web.Areas.Admin.Controllers.Member
{

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method,Inherited = false)]
    public class UpdateLoginingUserAttribute : ActionFilterAttribute
    {

        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            string actionName = filterContext.RouteData.Values["Action"].ToString();
            string ids = filterContext.HttpContext.Request.Form["ids"];
            string[] arrIds = ids.Split(',');
            LoginingUseBLL loginingUseBLL = new LoginingUseBLL();
            foreach(string id in arrIds)
            {
                if(StringHelper.IsInt(id))
                {
                    loginingUseBLL.UpdateData(int.Parse(id));
                }
            }
        }

    }
}
