public ActionResult Create(AdviserRegistrationBindingModel model)
        {
            ViewBag.professTypes = cmRepo.GetAllProfessionTypes().Select(p => new SelectListItem
            {
                Text  = p.ProfessionType1,
                Value = p.ProfessionTypeId.ToString()
            }).ToList();

            var allErrors = ModelState.Values.Where(v => v.Errors.Count > 0).ToList();

            if (ModelState.IsValid)
            {
                Adviser adviser = new Adviser(edisRepo)
                {
                    AdviserNumber       = User.Identity.GetUserId(),
                    ABNACN              = model.ABN,
                    CompanyName         = model.companyName,
                    Country             = model.country,
                    AddressLn1          = model.addressLine1,
                    AddressLn2          = model.addressLine2,
                    AddressLn3          = model.addressLine3,
                    CreatedOn           = DateTime.Now,
                    CurrentTitle        = model.currentPositionTitle,
                    ExperienceStartDate = model.industryExperienceStartDate,
                    Fax       = model.businessFax,
                    FirstName = model.firstName,
                    Gender    = model.gender,
                    LastName  = model.lastName,
                    RoleAndServicesSummary = model.roleAndServicesSummary,
                    GroupName  = model.dealerGroupName,
                    LastUpdate = DateTime.Now,
                    Lat        = new GoogleGeoService(model.addressLine1 + " "
                                                      + model.addressLine2 + " " + model.addressLine3 + " " + model.suburb + " "
                                                      + model.state + " " + model.country).GetCoordinatesLat(),
                    Lng = new GoogleGeoService(model.addressLine1 + " "
                                               + model.addressLine2 + " " + model.addressLine3 + " " + model.suburb + " "
                                               + model.state + " " + model.country).GetCoordinatesLng(),
                    MiddleName = model.middleName,
                    Mobile     = model.businessMobile,
                    Phone      = model.businessPhone,
                    PostCode   = model.postCode,
                    State      = model.state,
                    Suburb     = model.suburb,
                    Title      = model.title,
                    VerifiedId = BusinessLayerParameters.verificationStatus_NotVerified,

                    IndustryExperienceStartDate = model.industryExperienceStartDate,
                    BusinessPhone  = model.businessPhone,
                    BusinessMobile = model.businessMobile,
                    BusinessFax    = model.businessFax,

                    DAddressLine1 = model.dealerGroup_addressLine1,
                    DAddressLine2 = model.dealerGroup_addressLine2,
                    DAddressLine3 = model.dealerGroup_addressLine3,
                    DPostcode     = model.dealerGroup_postCode,
                    DState        = model.dealerGroup_state,
                    DSuburb       = model.dealerGroup_suburb,
                    DCountry      = model.dealerGroup_country,
                    Asfl          = model.asfl,
                    AuthorizedRepresentativeNumber = model.authorizedRepresentativeNumber,
                    DealerGroupName = model.dealerGroupName,
                    DealerGroupHasDerivativesLicense = model.dealerGroupHasDerivativesLicense ? true : false,
                    IsAuthorizedRepresentative       = model.isAuthorizedRepresentative ? true : false,

                    TotalAssetUnderManagement      = model.totalAssetUnderManagement,
                    TotalInvestmentUndermanagement = model.totalInvestmentUndermanagement,
                    TotalDirectAustralianEquitiesUnderManagement    = model.totalDirectAustralianEquitiesUnderManagement,
                    TotalDirectInterantionalEquitiesUnderManagement = model.totalDirectInterantionalEquitiesUnderManagement,
                    TotalDirectFixedInterestUnderManagement         = model.totalDirectFixedInterestUnderManagement,
                    TotalDirectLendingBookInterestUnderManagement   = model.totalDirectLendingBookInterestUnderManagement,
                    ApproximateNumberOfClients = model.approximateNumberOfClients,

                    ProfessiontypeId            = model.professiontypeId,
                    RemunerationMethodSpecified = model.remunerationMethodSpecified,
                    RemunerationMethod          = model.remunerationMethod,
                    NumberOfClientsId           = model.numberOfClientsId,
                    AnnualIncomeLevelId         = model.annualIncomeLevelId,
                    InvestibleAssetLevel        = model.investibleAssetLevel,
                    TotalAssetLevel             = ((EDIS_DOMAIN.Enum.Enums.TotalAssetLevels)model.totalAssetLevelId).ToString(),
                    TotalAssetLevelId           = model.totalAssetLevelId,
                };

                if (model.educations != null && model.educations.Count != 0)
                {
                    adviser.Institution      = model.educations[0].institution;
                    adviser.CourseTitle      = model.educations[0].courseTitle;
                    adviser.CourseStatus     = model.educations[0].courseStatus;
                    adviser.EducationLevelId = model.educations[0].educationLevelId;
                }

                if (edisRepo.CreateAdviserSync(adviser) != null)
                {
                    TempData["success"] = "Profile has been updated";
                }
                else
                {
                    TempData["error"] = "Profile update failed. Please try again.";
                }
            }

            checkEducationList(model);
            return(View(model));
        }