コード例 #1
0
ファイル: TestDeleteHelper.cs プロジェクト: SaberZA/habanero
        private static IBusinessObjectCollection AddRelatedObjects <T>(TestBO testBO,
                                                                       string relationshipName, int numberOfBos, bool isNew)
            where T : TestBO, new()
        {
            IBusinessObjectCollection children = testBO.Relationships.GetRelatedCollection(relationshipName);

            for (int count = 1; count <= numberOfBos; count++)
            {
                T testBO2 = new T();
                testBO2.SetStatus(BOStatus.Statuses.isNew, isNew);
                testBO2.MyBoID       = "2." + TestUtil.GetRandomString();
                testBO2.MyParentBoID = testBO.MyParentBoID;
                children.Add(testBO2);
            }
            return(children);
        }
コード例 #2
0
ファイル: TestDeleteHelper.cs プロジェクト: SaberZA/habanero
 private static IBusinessObjectCollection AddRelatedObjectsToPersisted <T>(TestBO testBO,
                                                                           string relationshipName, int numberOfBos)
     where T : TestBO, new()
 {
     return(AddRelatedObjectsToPersisted <T>(testBO, relationshipName, numberOfBos, false));
 }