Example #1
0
        public async Task <IActionResult> UserMonthlyReport()
        {
            var user = _userManager.GetUserName(User);
            var x    = await _userManager.FindByNameAsync(user);

            var sal = _userProfile.GetIdByEmail(x.Email);

            if (sal != 0)
            {
                var usersal = await _salary.GetAllMonthlyReport(sal);

                if (usersal != null)
                {
                    return(View(usersal));
                }
            }
            return(RedirectToAction("UserError"));
        }