public MainWindowViewModel(IServiceProvider sp) { this.HumanCenter = sp.GetService(typeof(IHumanCenter)) as IHumanCenter; this.PersonFactory = sp.GetService(typeof(IPersonFactory)) as IPersonFactory; this.OrganizationFactory = sp.GetService(typeof(IOrganizationFactory)) as IOrganizationFactory; this.Organizations = new ObservableCollection <Organization>(); HumanCenter.GetOrganizations().ForEach(org => Organizations.Add(org as Organization)); var names = new List <string>(); foreach (var o in Organizations) { names.Add(o.Name); } //this.OrganizationNames = new ObservableCollection<string>(names); OrganizationTypes = new ObservableCollection <string>(new List <string> { "School", "Company" }); PersonTypes = new ObservableCollection <string>(new List <string> { "Student", "Worker" }); PersonGenders = new ObservableCollection <string>(new List <string> { "Male", "Female" }); }
public OrganizationService( IOrganizationRepository organicationRepository, IOrganizationRequisitesRepository organizationRequisitesRepository, IOrganizationTypeRepository organizationTypeRepository, IOrganizationRepository organizationRepository, IOrganizationFactory organizationFactory, IOrganizationRequisiteFactory organizationRequisiteFactory) { _organizationRepository = organicationRepository; _organizationRequisitesRepository = organizationRequisitesRepository; _organizationTypeRepository = organizationTypeRepository; _organizationRepository = organizationRepository; _organizationFactory = organizationFactory; _organizationRequisiteFactory = organizationRequisiteFactory; }
public CreateOrganizationRequestHandler(IOrganizationFactory organizationFactory) { _organizationFactory = organizationFactory; }