public async Task <IActionResult> Default() { IdentityUser user = await _userManager.GetUserAsync(User); AgentDetailsDTO model = await _agentService.GetAgentDetails(user.Id); return(View(model)); }
public async Task <AgentDetailsDTO> GetAgentDetails(string Id) { DateTime now = DateTime.Now.ToUtcCuba(); IdentityUser user = await _userManager.FindByIdAsync(Id); double current = await _financieroService.GetMontoMesByAgente(Id, now); now = now.AddMonths(-1); double last = await _financieroService.GetMontoMesByAgente(Id, now); IEnumerable <RecargaDetail> recargas = await _financieroService.GetRecargasByAgente(Id); AgentDetailsDTO dto = new AgentDetailsDTO(user, current, last, recargas); return(dto); }
public async Task <IActionResult> Details(string Id) { AgentDetailsDTO model = await _agentService.GetAgentDetails(Id); return(View(model)); }