Example #1
0
        //解锁账号
        public ActionResult <Message> UnlockAdmin()
        {
            string[] idsStr = Request.Form["ids"];

            var msg    = new Message(10, "解锁失败");
            var idsInt = new List <int>();

            if (idsStr != null && idsStr.Count() > 0)
            {
                foreach (var id in idsStr)
                {
                    if (Validator.IsNumbers(id))
                    {
                        idsInt.Add(int.Parse(id));
                    }
                }

                msg = CMSAdminBO.UnlockByIDs(idsInt);
            }
            else
            {
                msg.Code = 101;
                msg.Msg  = "请选择要解锁的账号";
            }

            return(new JsonResult(msg));
        }