public SpecialistWork ThirdSpecialistWork() { var thirdSpecialistWork = new SpecialistWork { SpecialistId = new Int32() , PhotoID = new Int32() , PhotoPath = null }; return thirdSpecialistWork; }
public SpecialistWork FirstSpecialistWork() { var firstSpecialistWork = new SpecialistWork { SpecialistId = new Int32() , PhotoID = new Int32() , PhotoPath = null }; return firstSpecialistWork; }
public SpecialistWork SecondSpecialistWork() { var secondSpecialistWork = new SpecialistWork { SpecialistId = 2 , PhotoID = new Int32() , PhotoPath = "PhotoPath" }; return secondSpecialistWork; }
/// 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(); } }