public async Task <IActionResult> Edit(int id, [Bind("BvndetailsId,UserId,FirstName,MiddleName,LastName,DateOfBirth,RegistrationDate,EnrollmentBank,Email,PhoneNumber,Gender,LgaofOrigin,LgaofResidence,Nationality,PhoneNumberAlt,ResidentialAddress,StateOfOrigin,StateOfResidence,WatchListed,CreatedOn")] Bvndetails bvndetails)
        {
            if (id != bvndetails.BvndetailsId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bvndetails);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BvndetailsExists(bvndetails.BvndetailsId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(Ok(true));
            }
            //ViewData["UserId"] = new SelectList(_context.Users, "UsersId", "AccountNumber", bvndetails.UserId);
            return(Ok(false));
        }
        public async Task <IActionResult> Edit(int id, [Bind("UsersId,FirstName,MiddleName,LastName,Bvn,BvnIsValidated,Email,EmailIsValidated,PhoneNumber,PhoneNumberIsValidated,AccountNumber,AccountNumberIsValidated,BankId,StateId,CreatedOn,CreatedBy")] Users users)
        {
            if (id != users.UsersId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(users);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UsersExists(users.UsersId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(Ok(users));
        }
        public async Task <IActionResult> Edit(int id, [Bind("EmploymentDetailsId,UsersId,OrganizationName,OrganizationAddress,OrganizationType,PositionHeld,EmploymentType,EmploymentStatus,EmploymentDate,LastDayAtJob,Stateid,CreatedOn")] EmploymentDetails employmentDetails)
        {
            if (id != employmentDetails.EmploymentDetailsId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employmentDetails);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmploymentDetailsExists(employmentDetails.EmploymentDetailsId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(Ok(true));
            }
            //ViewData["UsersId"] = new SelectList(_context.Users, "UsersId", "AccountNumber", employmentDetails.UsersId);
            return(Ok(false));
        }