protected IBOColSelectorControl GetSelectorWith_4_Rows(out IBusinessObjectCollection col) { col = GetCollectionWith_4_Objects(); IBOColSelectorControl boColSelector = CreateSelector(); boColSelector.BusinessObjectCollection = col; return boColSelector; }
/// <summary> /// Constructor to initialise a new provider with the business object /// collection provided /// </summary> /// <param name="col">The business object collection</param> public EditableDataSetProvider(IBusinessObjectCollection col) : base(col) { _rowChangedHandler = RowChangedHandler; _rowDeletedHandler = RowDeletedHandler; _newRowHandler = NewRowHandler; _boAddedHandler = BOAddedHandler; }
private IBindingListView CreateBindingListView(Type boType, IBusinessObjectCollection businessObjectCollection) { _logger.Log("Start CreateBindingListView - Relationship : " + PropertyName, LogCategory.Debug); _logger.Log(GetStackTrace(), LogCategory.Debug); if (businessObjectCollection == null) { var businessObjectColType = typeof(BusinessObjectCollection<>).MakeGenericType(boType); businessObjectCollection = (IBusinessObjectCollection)Activator.CreateInstance(businessObjectColType); } IViewBuilder viewBuilder = null; try { var defaultViewBuilderType = typeof(DefaultViewBuilder<>).MakeGenericType(boType); viewBuilder = (IViewBuilder) Activator.CreateInstance(defaultViewBuilderType); } catch (Exception e) { _logger.Log(e.Message, LogCategory.Exception); Console.WriteLine(e); } var bindingListType = typeof(BindingListView<>).MakeGenericType(boType); return (IBindingListView)Activator.CreateInstance(bindingListType, businessObjectCollection, viewBuilder); }
/// <summary> /// Creates a dataset provider that is applicable to this grid. For example, a readonly grid would /// return a <see cref="ReadOnlyDataSetProvider"/>, while an editable grid would return an editable one. /// </summary> /// <param name="col">The collection to create the datasetprovider for</param> /// <returns>Returns the data set provider</returns> public override IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col) { return new ReadOnlyDataSetProvider(col) { RegisterForBusinessObjectPropertyUpdatedEvents = true }; }
public void AssertOneObjectInRemovedAndPersisted(IBusinessObjectCollection cpCol) { Assert.AreEqual(0, cpCol.Count); Assert.AreEqual(0, cpCol.AddedBusinessObjects.Count); Assert.AreEqual(1, cpCol.RemovedBusinessObjects.Count); Assert.AreEqual(1, cpCol.PersistedBusinessObjects.Count); Assert.AreEqual(0, cpCol.MarkedForDeleteBusinessObjects.Count); Assert.AreEqual(0, cpCol.CreatedBusinessObjects.Count); }
public void AssertOneObjectInCurrentAndCreatedCollection(IBusinessObjectCollection cpCol) { Assert.AreEqual(1, cpCol.Count, "One object should be in the cpCollection"); Assert.AreEqual(0, cpCol.AddedBusinessObjects.Count, "One object should be in the cpCollection"); Assert.AreEqual(0, cpCol.RemovedBusinessObjects.Count); Assert.AreEqual(0, cpCol.PersistedBusinessObjects.Count); Assert.AreEqual(0, cpCol.MarkedForDeleteBusinessObjects.Count); Assert.AreEqual(1, cpCol.CreatedBusinessObjects.Count); }
/// <summary> /// Sets the collection being represented to a specific collection /// of business objects /// </summary> /// <param name="collection">The collection to represent</param> /// <param name="includeBlank">Whether to a put a blank item at the /// top of the list</param> public void SetCollection(IBusinessObjectCollection collection, bool includeBlank) { if (_collection != null) { _collection.BusinessObjectAdded -= BusinessObjectAddedHandler; _collection.BusinessObjectRemoved -= BusinessObjectRemovedHandler; } _collection = collection; //TODO _Port: SetupComboBoxRightClickController(); SetComboBoxCollection(_comboBox, _collection, includeBlank); _collection.BusinessObjectAdded += BusinessObjectAddedHandler; _collection.BusinessObjectRemoved += BusinessObjectRemovedHandler; }
/// <summary> /// Specify the collection of objects to display and add these to the /// ListView object /// </summary> /// <param name="collection">The collection of business objects</param> public void SetCollection(IBusinessObjectCollection collection) { if (Collection != null) { Collection.BusinessObjectAdded -= BusinessObjectAddedHandler; Collection.BusinessObjectRemoved -= BusinessObjectRemovedHandler; Collection.BusinessObjectUpdated -= BusinessObjectUpdatedHandler; } Collection = collection; SetListViewCollection(ListView, Collection); Collection.BusinessObjectAdded += BusinessObjectAddedHandler; Collection.BusinessObjectRemoved += BusinessObjectRemovedHandler; Collection.BusinessObjectUpdated += BusinessObjectUpdatedHandler; }
public void Setup() { ClassDef.ClassDefs.Clear(); FixtureEnvironment.SetupInMemoryDataAccessor(); FixtureEnvironment.SetupNewIsolatedBusinessObjectManager(); MyBO.LoadClassDefsNoUIDef(); _propDefGuid = new PropDef("PropName", typeof(Guid), PropReadWriteRule.ReadWrite, null); _validBusinessObject = new MyBO { TestProp = "ValidValue" }; _collection = new BusinessObjectCollection<MyBO> { _validBusinessObject }; _validLookupValue = _validBusinessObject.ToString(); _propDefGuid.LookupList = new BusinessObjectLookupListStub(typeof(MyBO), _collection); _validBusinessObjectNotInList = new MyBO { TestProp = "AnotherValue" }; ClassDef.ClassDefs.Clear(); }
protected override IBindingListView GetBindingListView(IBusinessObjectCollection businessObjectCollection) { if (businessObjectCollection == null) throw new ArgumentNullException("businessObjectCollection"); var classType = GetClassType(businessObjectCollection); if (this.ClassDef == null || this.ClassDef != businessObjectCollection.ClassDef) { this.ClassDef = businessObjectCollection.ClassDef; } _logger.Log("Start CreateBindingListView : classType : " + classType, LogCategory.Debug); _logger.Log(GetStackTrace(), LogCategory.Debug); //Needs this code // var uiDef = ((ClassDef) this.ClassDef).GetUIDef(UiDefName); // if (uiDef == null) // { // throw new ArgumentException // (String.Format // ("You cannot Get the data for the grid {0} since the uiDef {1} cannot be found for the classDef {2}", // this._gridBase.Name, UiDefName, ((ClassDef)this.ClassDef).ClassName)); // } IViewBuilder viewBuilder = null; try { Type defaultViewBuilderType = typeof (DefaultViewBuilder<>).MakeGenericType(classType); viewBuilder = (IViewBuilder) Activator.CreateInstance(defaultViewBuilderType); } catch (Exception e) { _logger.Log(e.Message, LogCategory.Exception); Console.WriteLine(e); } var bindingListType = typeof (BindingListView<>).MakeGenericType(classType); _bindingListView = (IBindingListView) Activator.CreateInstance(bindingListType, businessObjectCollection, viewBuilder); return _bindingListView; }
protected override IDatabaseAgent Create(IBusinessObjectCollection businessObjectCollection) { return(new EmployeeDetailDatabaseAgent(businessObjectCollection)); }
public virtual IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col) { return(null); //Thi is using a BindingListView what I need to figure out is how I can implement the //IDataSetProvider Interface using the bindingListview. }
private void AddBusinessObjectToCollectionNode (IBusinessObjectCollection businessObjectCollection, IBusinessObject businessObject) { if (businessObjectCollection != null && ChildCollectionNodes.ContainsKey(businessObjectCollection)) { NodeState nodeState = ChildCollectionNodes[businessObjectCollection]; if (nodeState.IsLoaded) { ITreeNode node = nodeState.Node; AddBusinessObjectNode(node.Nodes, businessObject); } else { UpdateNodeDummy(nodeState, businessObjectCollection.Count); } } }
///<summary> /// Loads the tree view with all teh business objects held in the businessObjectCollection. /// Loads the children of these business objects. /// The Tree will be expanded only the specified level. ///</summary> ///<param name="businessObjectCollection"></param> ///<param name="levelsToExpand"></param> public void LoadTreeView(IBusinessObjectCollection businessObjectCollection, int levelsToExpand) { CleanUp(); // ControlsHelper.SafeGui // ((IControlHabanero)_treeView, delegate // { TreeView.BeginUpdate(); TreeView.Nodes.Clear(); if (businessObjectCollection != null) { AddCollectionNode(TreeView.Nodes, businessObjectCollection); } TreeView.EndUpdate(); ExpandLevels(TreeView.Nodes, levelsToExpand); // }); }
public void RegisterForAddedEvent(IBusinessObjectCollection cpCol) { _addedEventFired = false; cpCol.BusinessObjectAdded += delegate { _addedEventFired = true; }; }
/// <summary> /// See <see cref="IGridBase"/>.<see cref="IBusinessObjectCollection"/> /// </summary> public void SetBusinessObjectCollection(IBusinessObjectCollection col) { if (_gridBase.Columns.Count <= 0 && col != null) { //if (col == null) return; throw new GridBaseSetUpException ("You cannot call SetBusinessObjectCollection if the grid's columns have not been set up"); } _boCol = col; if (col == null) { ClearItems(); return; } //Hack_: this is to overcome a bug_ in Gizmox(VWG) where the grid was freezing after delete // but should not cause a problem with win since it removed the currently selected // item which is the deleted item col.BusinessObjectRemoved += delegate { SelectedBusinessObject = null; }; GridLoader(_gridBase, _boCol); if (_gridBase.Rows.Count > 0) { if (!IsFirstRowSelected()) { SelectFirstRow(); } } if (AutoSelectFirstItem) { FireBusinessObjectSelected(); } FireCollectionChanged(); }
public void SetBusinessObjectCollection(IBusinessObjectCollection boCollection) { InternalSetBOCol(boCollection); }
public AccessDetailsPresentationEntityCollection(IPresenter presenter, IBusinessObjectCollection businessObjectCollection) : base(presenter, AccessDetailsPresentationEntityFactory.Factory, businessObjectCollection) { }
protected override IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col) { return(new EditableDataSetProvider(col)); }
protected override IPresentationEntityCollection Create(IPresenter presenter, IBusinessObjectCollection businessObjectCollection) { return(new EmployeeDetailPresentationEntityCollection(presenter, businessObjectCollection)); }
public TableInformationDatabaseAgent(IBusinessObjectCollection businessObjectCollection) : base(businessObjectCollection) { SelectAllCommand = new TableInformationSelectCommand(this, TableInformationQuery.SelectAllQuery); }
protected override IDatabaseAgent Create(IBusinessObjectCollection businessObjectCollection) { return(new TableInformationDatabaseAgent(businessObjectCollection)); }
/// <summary> /// Reloads a BusinessObjectCollection using the criteria it was originally loaded with. You can also change the criteria or order /// it loads with by editing its SelectQuery object. The collection will be cleared as such and reloaded (although Added events will /// only fire for the new objects added to the collection, not for the ones that already existed). /// </summary> /// <param name="collection">The collection to refresh</param> public static void Refresh(IBusinessObjectCollection collection) { BORegistry.DataAccessor.BusinessObjectLoader.Refresh(collection); }
/// <summary> /// Creates a dataset provider that is applicable to this grid. For example, a readonly grid would /// return a <see cref="ReadOnlyDataSetProvider"/>, while an editable grid would return an editable one. /// </summary> /// <param name="col">The collection to create the datasetprovider for</param> /// <returns>Returns the data set provider</returns> public abstract IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col);
/// <summary> /// Constructor to initialise a new object creator /// </summary> /// <param name="boCol">The collection this BO will be created as part of /// (it will be added to the collection proper when it is saved)</param> public DefaultBOCreator(IBusinessObjectCollection boCol) { _boCol = boCol; }
protected override IDatabaseAgent Create(IBusinessObjectCollection businessObjectCollection) { return(new InterviewFactorDatabaseAgent(businessObjectCollection)); }
public BusinessObjectLookupListStub(Type type, IBusinessObjectCollection boCollection) : this(type, boCollection, "") { }
public AppointmentOrderFactorDatabaseAgent(IBusinessObjectCollection businessObjectCollection) : base(businessObjectCollection) { SelectAllCommand = new AppointmentOrderFactorSelectCommand(this, AppointmentOrderFactorQuery.SelectAllQuery); }
/// <summary> /// Returns a DataView based on the <see cref="IBusinessObjectCollection"/> defined by <paramref name="boCol"/>. /// The Columns in the <see cref="DataView"/> will be the collumns defined in the Grids <see cref="UiDefName"/> /// </summary> /// <param name="boCol">The collection that the DataView is based on</param> /// <returns></returns> protected virtual IBindingListView GetBindingListView(IBusinessObjectCollection boCol) { DataSetProvider = _gridBase.CreateDataSetProvider(boCol); if (this.ClassDef == null || this.ClassDef != _boCol.ClassDef) { this.ClassDef = _boCol.ClassDef; } var uiDef = ((ClassDef) this.ClassDef).GetUIDef(UiDefName); if (uiDef == null) { throw new ArgumentException (String.Format ("You cannot Get the data for the grid {0} since the uiDef {1} cannot be found for the classDef {2}", this._gridBase.Name, UiDefName, ((ClassDef) this.ClassDef).ClassName)); } return DataSetProvider.GetDataView(uiDef.UIGrid); }
public CallLetterPresentationEntityCollection(IPresenter presenter, IBusinessObjectCollection businessObjectCollection) : base(presenter, CallLetterPresentationEntityFactory.Factory, businessObjectCollection) { }
public NewEnumerator(IBusinessObjectCollection businessObjectCollection, ConstructorInfo constructor, IEnumerable <string> propertyNames) { _businessObjectCollection = businessObjectCollection; _constructor = constructor; _propertyNames = propertyNames; }
/// <summary> /// Set the list of objects in the ComboBox to a specific collection of /// business objects.<br/> /// Important: If you are changing the business object collection, /// use the SetBusinessObjectCollection method instead, which will call this method /// automatically. /// </summary> /// <param name="cbx">The ComboBox being controlled</param> /// <param name="col">The business object collection used to populate the items list</param> private void SetComboBoxCollectionInternal(IComboBox cbx, IBusinessObjectCollection col) { int width = cbx.Width; IBusinessObject selectedBusinessObject = SelectedBusinessObject; _logger.Log("Start SetComboBoxCollectionInternal Combo : " + cbx.Name + " SelectedBO : (" + SelectedBusinessObject + ")", LogCategory.Debug); // _logger.Log(GetStackTrace(), LogCategory.Debug); if (this.PreserveSelectedItem && this.AutoSelectFirstItem) { _logger.Log("Start SetComboBoxCollectionInternal Combo : " + cbx.Name + " for BOCol of " + col.ClassDef + " has PreserveSelectedItem and AutoSelectFirstItem. These are mutually exclusive settings", LogCategory.Warn); } /* _logger.Log("Start SetComboBoxCollectionInternal SelectedBO : (" + SelectedBusinessObject + ")", LogCategory.Debug); * _logger.Log("Start SetComboBoxCollectionInternal PreserveSelectedItem : (" + PreserveSelectedItem + ")", LogCategory.Debug); * _logger.Log("Start SetComboBoxCollectionInternal AutoSelectFirstItem : (" + AutoSelectFirstItem + ")", LogCategory.Debug);*/ try { //cbx.MustRaiseSelectionChangedEvents = false; cbx.SelectedIndex = -1; cbx.Text = null; cbx.Items.Clear(); } finally { //cbx.MustRaiseSelectionChangedEvents = true; } var numBlankItems = 0; if (this.IncludeBlankItem) { cbx.Items.Add(""); numBlankItems++; //The some purpose of this is to set the selected item later if AutoSelectFirstItem is true. } if (col == null) { return; } //This is a bit of a hack but is used to get the //width of the dropdown list when it drops down // uses the preferedwith calculation on the //Label to do this. Makes drop down width equal to the // width of the longest name shown. ILabel lbl = _controlFactory.CreateLabel("", false); foreach (IBusinessObject businessObject in col) { lbl.Text = businessObject.ToString(); if (lbl.PreferredWidth > width) { width = lbl.PreferredWidth; } cbx.Items.Add(businessObject); } if (PreserveSelectedItem && selectedBusinessObject != null) { var objectToSelect = (col.Contains(selectedBusinessObject) ? selectedBusinessObject : null); if (objectToSelect != null) { SelectedBusinessObject = objectToSelect; } } else if (col.Count > 0 && AutoSelectFirstItem && selectedBusinessObject == null) { cbx.SelectedIndex = numBlankItems; } if (width == 0) { width = 1; } cbx.DropDownWidth = width > cbx.Width ? width : cbx.Width; }
private void AddCollectionNode (ITreeNodeCollection nodeCollection, IBusinessObjectCollection businessObjectCollection) { foreach (IBusinessObject businessObject in businessObjectCollection) { AddBusinessObjectNode(TreeView.Nodes, businessObject); } }
public void SetCollection(IBusinessObjectCollection collection, bool includeBlanItems) { this.IncludeBlankItem = includeBlanItems; this.SetCollection(collection); }
private void RemoveBusinessObjectFromCollectionNode (IBusinessObjectCollection businessObjectCollection, IBusinessObject businessObject) { if (businessObjectCollection != null && ChildCollectionNodes.ContainsKey(businessObjectCollection)) { NodeState nodeState = ChildCollectionNodes[businessObjectCollection]; if (nodeState.IsLoaded) { RemoveBusinessObjectNode(businessObject); } else { UpdateNodeDummy(nodeState, businessObjectCollection.Count); } } }
protected override IDatabaseAgent Create(IBusinessObjectCollection businessObjectCollection) { return(new TableSequanceNumberDatabaseAgent(businessObjectCollection)); }
internal static void SetupCriteriaForRelationship(IMultipleRelationship relationship, IBusinessObjectCollection collection) { Criteria relationshipCriteria = Criteria.FromRelationship(relationship); IOrderCriteria preparedOrderCriteria; var orderCriteriaString = relationship.OrderCriteria.ToString(); try { preparedOrderCriteria = QueryBuilder.CreateOrderCriteria(relationship.RelatedObjectClassDef, orderCriteriaString); } catch (InvalidOrderCriteriaException) { throw new InvalidOrderCriteriaException("The Relationship '" + relationship.RelationshipName + "' on the ClassDef '" + relationship.OwningBO.ClassDef.ClassNameFull + "' has an Invalid OrderCriteria '" + orderCriteriaString); } //QueryBuilder.PrepareCriteria(relationship.RelatedObjectClassDef, relationshipCriteria); collection.SelectQuery.Criteria = relationshipCriteria; collection.SelectQuery.OrderCriteria = preparedOrderCriteria; }
protected override IPresentationEntityCollection Create(IPresenter presenter, IBusinessObjectCollection businessObjectCollection) { return(new PayanarApplicationPresentationEntityCollection(presenter, businessObjectCollection)); }
public InterviewFormDetailsDatabaseAgent(IBusinessObjectCollection businessObjectCollection) : base(businessObjectCollection) { SelectAllCommand = new InterviewFormDetailsSelectCommand(this, InterviewFormDetailsQuery.SelectAllQuery); }
/// <summary> /// Clears the Business Object collection and removes all tab pages. /// </summary> public virtual void Clear() { ClearTabPages(); _businessObjectCollection = null; }
public void SetBusinessObjectCollection(IBusinessObjectCollection col) { BusinessObjectCollection = col; }
public InterviewGradePresentationEntityCollection(IPresenter presenter, IBusinessObjectCollection businessObjectCollection) : base(presenter, InterviewGradePresentationEntityFactory.Factory, businessObjectCollection) { }
public void RegisterForAddedAndRemovedEvents(IBusinessObjectCollection cpCol) { RegisterForAddedEvent(cpCol); RegisterForRemovedEvent(cpCol); }
public TableSequanceNumberDatabaseAgent(IBusinessObjectCollection businessObjectCollection) : base(businessObjectCollection) { SelectAllCommand = new TableSequanceNumberSelectCommand(this, TableSequanceNumberQuery.SelectAllQuery); }
public BusinessObjectLookupListStub(Type boType, IBusinessObjectCollection boCollection, string sort) : base(boType, "", sort, true) { _boCollection = boCollection; }
/// <summary> /// Sets the collection being represented to a specific collection /// of business objects /// </summary> /// <param name="collection">The collection to represent</param> public abstract void SetCollection(IBusinessObjectCollection collection);
/// <summary> /// Verifies that the item in the tree nodes collection identified by the index is matched to the the /// item in the Business object collection identified by the index. I.e. the ordering of the nodes collection matches the /// business object collection. /// </summary> /// <param name="relationship"></param> /// <param name="relationshipNode"></param> /// <param name="index"></param> private static void AssertChildNodeLoadedInTree (IBusinessObjectCollection relationship, ITreeNode relationshipNode, int index) { Assert.AreEqual(relationship[index].ToString(), relationshipNode.Nodes[index].Text); }
/// <summary> /// Creates the appropriate dataSetProvider depending on the grid type e.g. editable grid should return a /// <see cref="EditableDataSetProvider"/> and a readonly grid should return a <see cref="ReadOnlyDataSetProvider"/> /// </summary> /// <param name="col">The column that the dataset provider is being created for</param> /// <returns>The created dataset provider</returns> public override IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col) { return new EditableDataSetProvider(col); }
/// <summary> /// Sets the default grid loader which is used as the default for the GridLoader delegate. /// If you want to load in any other way then please set the <see cref="GridLoader"/> /// delegate to load your business objects as you require. /// </summary> public void DefaultGridLoader(IGridBase gridBase, IBusinessObjectCollection boCol) { if (boCol == null) { gridBase.DataSource = null; return; } var bindingListView = GetBindingListView(boCol); try { gridBase.SelectionChanged -= _gridBaseOnSelectionChangedHandler; _fireBusinessObjectSelectedEvent = false; gridBase.DataSource = bindingListView; if (!AutoSelectFirstItem) gridBase.SelectedBusinessObject = null; } finally { gridBase.SelectionChanged += _gridBaseOnSelectionChangedHandler; _fireBusinessObjectSelectedEvent = true; } }
/// <summary> /// Sets the business object collection displayed in the grid. This /// collection must be pre-loaded using the collection's Load() command. /// The default UI definition will be used, that is a 'ui' element /// without a 'name' attribute. /// </summary> /// <param name="col">The collection of business objects to display. This /// collection must be pre-loaded.</param> public void SetBusinessObjectCollection(IBusinessObjectCollection col) { BusinessObjectCollection = col; }
public void RegisterForAddedAndRemovedEvents(IBusinessObjectCollection cpCol) { RegisterForAddedEvent(cpCol); RegisterForRemovedEvent(cpCol); }
private void InternalSetBOCol(IBusinessObjectCollection boCollection) { _readOnlyGridControlManager.SetBusinessObjectCollection(boCollection); }
///<summary> /// Loads the tree view with all the business objects held in the businessObjectCollection. /// Loads the children of these business objects. /// The Tree will be expanded only one level. ///</summary> ///<param name="businessObjectCollection"></param> public void LoadTreeView(IBusinessObjectCollection businessObjectCollection) { LoadTreeView(businessObjectCollection, 0); }
public PropertyEnumerator(IBusinessObjectCollection businessObjectCollection, string propertyName) { _businessObjectCollection = businessObjectCollection; _propertyName = propertyName; }
public void AssertAllCollectionsHaveNoItems(IBusinessObjectCollection cpCol) { Assert.AreEqual(0, cpCol.Count); Assert.AreEqual(0, cpCol.AddedBusinessObjects.Count); Assert.AreEqual(0, cpCol.RemovedBusinessObjects.Count); Assert.AreEqual(0, cpCol.PersistedBusinessObjects.Count); Assert.AreEqual(0, cpCol.MarkedForDeleteBusinessObjects.Count); Assert.AreEqual(0, cpCol.CreatedBusinessObjects.Count); }
protected override IDatabaseAgent Create(IBusinessObjectCollection businessObjectCollection) { return(new CallLetterDatabaseAgent(businessObjectCollection)); }
/// <summary> /// Creates a dataset provider that is applicable to this grid. For example, a readonly grid would /// return a <see cref="ReadOnlyDataSetProvider"/>, while an editable grid would return an editable one. /// </summary> /// <param name="col">The collection to create the datasetprovider for</param> /// <returns>Returns the data set provider</returns> public abstract IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col);
public PayanarApplicationDatabaseAgent(IBusinessObjectCollection businessObjectCollection) : base(businessObjectCollection) { SelectAllCommand = new PayanarApplicationSelectCommand(this, PayanarApplicationQuery.SelectAllQuery); }
protected override IDataSetProvider CreateDataSetProvider(IBusinessObjectCollection col) { _dataSetProvider = new ReadOnlyDataSetProvider(col); _dataSetProvider.RegisterForBusinessObjectPropertyUpdatedEvents = true; return _dataSetProvider; }
///<summary> /// Loads the tree view with all teh business objects held in the businessObjectCollection. /// Loads the children of these business objects. /// The Tree will be expanded only the specified level. /// The tree will be loaded with child objects only to the number of levelsToDisplay. ///</summary> ///<param name="businessObjectCollection"></param> ///<param name="levelsToExpand"></param> ///<param name="levelsToDisplay"></param> public void LoadTreeView (IBusinessObjectCollection businessObjectCollection, int levelsToExpand, int levelsToDisplay) { _levelsToDisplay = levelsToDisplay; LoadTreeView(businessObjectCollection, levelsToExpand); }