public MaintenanceCustomService FirstMaintenanceCustomService() { var firstMaintenanceCustomService = new MaintenanceCustomService { CompanyId = 0 , Demolition_Services = new Boolean() , Disability_Accessibility = new Boolean() , Childproofing = new Boolean() , Energy_Efficiency_Inspection = new Boolean() , Excavation = new Boolean() , Biohazard_Cleanup = new Boolean() , Mold_Removal = new Boolean() , Home_Staging = new Boolean() , Inspection_Services = new Boolean() , Moving_Services = new Boolean() , Restoration = new Boolean() , Metal_Restoration = new Boolean() , Earthquake_Retrofitting = new Boolean() , Epoxy_Flooring_Excavators = new Boolean() , Structural_Engineering = new Boolean() , Trash_Removal___Hauling = new Boolean() , Welding = new Boolean() , Mudjacking = new Boolean() , Picture_Framing = new Boolean() , Woodworking_Services = new Boolean() }; return firstMaintenanceCustomService; }
/// Initialize ProfileByType public void SpecialistInitialProfileValues(RegisterModel model, int specialistId) { if (specialistId != 0) { var nextCompanyId = UnitofWork.MaintenanceCompanyLookUpRepository.All.OrderByDescending(x => x.CompanyId) .First() .CompanyId + 1; var newMaintenanceCompanyLookUp = new MaintenanceCompanyLookUp { CompanyId = nextCompanyId, UserId = specialistId, Role = (int) LookUpRoles.Roles.Specialist }; var newMaintenanceCompany = new MaintenanceCompany { CompanyId = nextCompanyId, Name = model.UserName, EmailAddress = model.Email, GoogleMap = "USA", Country = "US", MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp // CountryCode = "US" }; var newMaintenanceCompanySpecialization = new MaintenanceCompanySpecialization { CompanyId = nextCompanyId, NumberofEmployee = 1, NumberofCertifitedEmplyee = 1, IsInsured = true, Rate = 50, CurrencyID = 1, Currency = "USD", MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceCustomService = new MaintenanceCustomService { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceExterior = new MaintenanceExterior { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceInterior = new MaintenanceInterior { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceNewConstruction = new MaintenanceNewConstruction { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceRepair = new MaintenanceRepair { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var newMaintenanceUtility = new MaintenanceUtility { CompanyId = nextCompanyId, MaintenanceCompanyLookUp = newMaintenanceCompanyLookUp }; var specialistwork = new SpecialistWork { PhotoPath = "./../images/dotimages/home-handyman-projects.jpg", SpecialistId = specialistId }; UnitofWork.MaintenanceCompanyLookUpRepository.Add(newMaintenanceCompanyLookUp); UnitofWork.MaintenanceCompanyRepository.Add(newMaintenanceCompany); UnitofWork.MaintenanceCompanySpecializationRepository.Add(newMaintenanceCompanySpecialization); UnitofWork.MaintenanceCustomServiceRepository.Add(newMaintenanceCustomService); UnitofWork.MaintenanceExteriorRepository.Add(newMaintenanceExterior); UnitofWork.MaintenanceInteriorRepository.Add(newMaintenanceInterior); UnitofWork.MaintenanceNewConstructionRepository.Add(newMaintenanceNewConstruction); UnitofWork.MaintenanceRepairRepository.Add(newMaintenanceRepair); UnitofWork.MaintenanceUtilityRepository.Add(newMaintenanceUtility); UnitofWork.SpecialistWorkRepository.Add(specialistwork); UnitofWork.Save(); } }