private void RetrieveDataSource() { using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey)) { DEntityFacade entityFacade = new DEntityFacade(uow); OrderStatusDataSource = entityFacade.GetEntityItemList((int)EntityTypes.OrderStatus); CRM.Component.SupplierFacade supplierFacade = new CRM.Component.SupplierFacade(uow); SupplierDataSource = supplierFacade.GetBindingList(); } }
public void AttachProperties(SubjectDto subjectDto) { foreach (SubjectFieldDto field in subjectDto.SubjectFields) { // Retrieve Pickup type ListDataSource if (field.DucType == DucTypes.Pickup && field.PickupEntityId != null) { DEntityFacade facade = new DEntityFacade(UnitOfWork); field.ListDataSource = facade.GetEntityItemList(field.PickupEntityId); } // Retrieve Lookup type ListDataSource else if (field.DucType == DucTypes.Lookup && field.LookupSubjectId != null) { field.ListDataSource = GetBindingList(field.LookupSubjectType); } } }