예제 #1
0
        public async Task <IActionResult> CitizenMadeCheckup(CitizenMadeCheckup citizenMadeCheckup)
        {
            var checkuped_user = userManager.Users.Where(usr => usr.Id == citizenMadeCheckup.ID).FirstOrDefault();

            checkuped_user.Bloodgroup  = citizenMadeCheckup.Bloodgroup;
            checkuped_user.Height      = citizenMadeCheckup.Height;
            checkuped_user.Weight      = citizenMadeCheckup.Weight;
            checkuped_user.CheckupData = citizenMadeCheckup.CheckupData;

            IdentityResult task = await userManager.UpdateAsync(checkuped_user);

            TempData["SuccessMessage"] = "Profile Updated Successfully!";
            return(RedirectToAction("Dashboard", "Citizen"));
        }
예제 #2
0
        //remaining
        public async Task <IActionResult> CitizenMadeCheckup()
        {
            ApplicationUser usr = await GetCurrentUserAsync();

            var citizenMadeCheckup = new CitizenMadeCheckup()
            {
                ID          = usr.Id,
                Height      = usr.Height,
                Weight      = usr.Weight,
                Bloodgroup  = usr.Bloodgroup,
                CheckupData = usr.CheckupData,
            };

            return(View(citizenMadeCheckup));
        }