public async Task <IActionResult> Create(InteractionRecord interactionRecord) { if (!ModelState.IsValid) { return(View()); } await _ploomesApiRepo.CreateInteractionRecordAsync(interactionRecord); return(RedirectToAction("Index", "Home")); }
public async Task <IActionResult> Win(int dealId) { Deal deal = await _ploomesApiRepo.FindDealByIdAsync(dealId); await _ploomesApiRepo.WinDealAsync(deal); await _ploomesApiRepo.CreateInteractionRecordAsync(new InteractionRecord() { ContactId = deal.ContactId, Content = "Negócio fechado!" }); return(RedirectToAction("Index", "Home")); }