Esempio n. 1
0
        public async Task <IActionResult> Complete(int id)
        {
            var job = _jobs.GetById(id);

            _jobapps.SetComplete(id);
            var user = await _userManager.GetUserAsync(User);

            var ouruser = _users.GetById(job.Employer.Id);
            await _users.AddStarValueToJobExperience(job.Employer.Id, 1);

            await _users.AddStarValueToHiringExperience(job.ApplicationUser.Id, 1);

            await _users.AddFundsAsync(ouruser.Id, job.Price / 100 *95);

            await _users.AddFundsAsync("4d9563af-0ca4-4045-a687-4ff0db4560aa", job.Price / 100 *5);

            return(RedirectToAction("MyJobs"));
        }