Exemplo n.º 1
0
        public async Task <IActionResult> Default()
        {
            IdentityUser user = await _userManager.GetUserAsync(User);

            AgentDetailsDTO model = await _agentService.GetAgentDetails(user.Id);

            return(View(model));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Details(string Id)
        {
            AgentDetailsDTO model = await _agentService.GetAgentDetails(Id);

            return(View(model));
        }