示例#1
0
        public IActionResult DeleteGift(Gift gift)
        {
            int giftStatus = _gift.GetStatus(gift.GiftId);

            if (giftStatus != 2)
            {
                _gift.RemoveGiftByUpdateStatus(gift.GiftId);
            }
            else
            {
                ViewBag.GiftIsUsing = "Quà tặng đang được áp dụng, không thể xóa.";
            }
            getGiftByBrandId();
            return(View("ManageGift"));
        }