Пример #1
0
        public async Task <IActionResult> MakeDiscount(int gameId, decimal discountPrice)
        {
            var game = _context.Games.Find(gameId);

            game.DiscountPrice = discountPrice;
            _context.Update(game);
            await _context.SaveChangesAsync();

            return(Json("İndirim uygulandı."));
        }
Пример #2
0
        public async Task <IActionResult> AnswerTicket(TicketAnswerVm data)
        {
            _context.SupportTicketSteps.Add(new SupportTicketStep
            {
                AddedDate       = DateTime.Now,
                AnsweredUserId  = (await _userManager.FindByNameAsync(User.Identity.Name)).Id,
                Content         = data.Content,
                SupportTicketId = data.TicketId,
                IsActive        = true
            });

            await _context.SaveChangesAsync();

            return(Json("Cevap iletildi"));
        }