public MaintenanceRepair FirstMaintenanceRepair() { var firstMaintenanceRepair = new MaintenanceRepair { CompanyId = 2 , Appliances_Service_and_Repair = new Boolean() , Bathtub___Sink_Repair_Refinishing = new Boolean() , Black_Mold_Removal = new Boolean() , Carpet___Rug_Cleaning = new Boolean() , Caulking = new Boolean() , Chimney_Services = new Boolean() , Cleaning_Services = new Boolean() , Computers_Service_and_Repair = new Boolean() , Duct_Cleaning = new Boolean() , Foundation_Repair = new Boolean() , Furniture_Repair___Restoration = new Boolean() , Garage_Door_Install___Repair = new Boolean() , Handyman_Services = new Boolean() , Drain_Pipe = true , Doors = new Boolean() , Locksmithing = new Boolean() , Pest_Control = new Boolean() , Property_Management = new Boolean() , Snow_Removal = new Boolean() , Window_Cleaning = new Boolean() , Glass___Window_Services = new Boolean() , Mailbox_Repair = new Boolean() , MaintenanceCompanyLookUp = new MaintenanceCompanyLookUp() }; return firstMaintenanceRepair; }
/// 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(); } }