public IActionResult UpdateStatus(int id, Boolean isShow)
        {
            IActionResult response   = null;
            UserModels    userModels = new UserModels();
            var           mess       = string.Empty;
            int           rt         = 0;
            var           userPage   = new UserPage();

            userPage            = userModels.GetUserPagebyId(id);
            userPage.IsShow     = isShow;
            userPage.ModifyDate = DateTime.Now;

            rt = userModels.UpdateUserPage(id, userPage);

            if (rt > 0)
            {
                response = Json(new { code = Constant.Success, message = Constant.MessageUpdateCompleted });
            }
            else
            {
                response = Json(new { code = Constant.Fail, message = Constant.MessageUpdateUncompleted });
            }

            return(response);
        }
        public IActionResult Delete(int id)
        {
            IActionResult response   = null;
            string        mess       = string.Empty;
            UserModels    userModels = new UserModels();

            var identity = (ClaimsIdentity)User.Identity;
            IEnumerable <Claim> claims = identity.Claims;
            var userLogin = claims.FirstOrDefault(c => c.Type == ClaimTypes.Email).Value;

            UserPage userPage = userModels.GetUserPagebyId(id);

            if (userPage != null)
            {
                //// delete UserPageAction
                bool rt = userModels.DeleteUserPage(userPage.Id);
                if (rt)
                {
                    response = Json(new { code = Constant.Success, message = Constant.MessageDeleteCompleted });
                }
                else
                {
                    response = Json(new { code = Constant.Fail, message = Constant.MessageDeleteUncompleted });
                }
            }
            else
            {
                response = Json(new { code = Constant.NotExist, message = Constant.MessageNotExist });
            }

            return(response);
        }
        public IActionResult Get(int id)
        {
            UserModels    sv       = new UserModels();
            IActionResult response = null;
            UserPage      userPage = sv.GetUserPagebyId(id);

            ////check permission update
            if (userPage != null)
            {
                response = Json(userPage);
            }
            else
            {
                response = Json(new { code = Constant.NotExist, message = Constant.MessageNotExist });
            }

            return(response);
        }