public IActionResult Delivered(int?Id) { if (Id == null) { return(NotFound()); } var request = _setBoxRequest.GetById(Id); request.Status = _statusService.GetByName("Delivered"); _setBoxRequest.Update(request); return(RedirectToAction("CustomerSetBoxRequest")); }
public IActionResult Approved(int?Id) { if (Id == null) { return(NotFound()); } var request = _newSetBoxService.GetById(Id); if (request == null) { return(NotFound()); } CustomerCard card = _cardService.GetCardByNumber(request.Card.CardNumber); card.SetBox = _setboxService.GetById(request.Card.Id); _cardService.Update(card); request.Status = _statusService.GetByName("AdminApproved"); _newSetBoxService.Update(request); return(RedirectToAction("Index")); }