예제 #1
0
        public async Task <IActionResult> Stats(string Id, string returnUrl)
        {
            if (string.IsNullOrEmpty(Id))
            {
                Id = _userManager.GetUserId(User);
            }
            var now = DateTime.Now;
            var vm  = new DoctorStatsViewModel()
            {
                Start     = new DateTime(now.Year, now.Month, 1),
                End       = now.Date,
                ReturnUrl = returnUrl
            };

            vm.Stats = await _statsService.GetDoctorStats(Id, vm.Start, vm.End);

            return(View(vm));
        }