예제 #1
0
        public ActionResult RemoveAwardPost(string id)
        {
            {
                var isDeleted = _awardService.DeleteAward(User.Identity.GetUserId(), id);
                if (isDeleted)
                {
                    return(Json(new { success = true }));
                }
            }
            var award = GetAward(User.Identity.GetUserId(), id);

            ModelState.AddModelError(string.Empty, "The item cannot be removed");
            return(PartialView("_RemoveAward", award));
        }