コード例 #1
1
        public EntityCollection<CatalogsEntity> GetAllParent(SortExpression sort)
        {
            EntityCollection<CatalogsEntity> cats = new EntityCollection<CatalogsEntity>();

            SortExpression _sort = new SortExpression();
            if (sort != null)
            {
                _sort = sort;
            }
            else
            {
                _sort.Add(CatalogsFields.CatalogName | SortOperator.Ascending);
            }

            IPredicateExpression predicate = new PredicateExpression();
            predicate.Add(CatalogsFields.ParentId == 0);
            predicate.AddWithAnd(CatalogsFields.IsVisible == true);

            RelationPredicateBucket filter = new RelationPredicateBucket();
            filter.PredicateExpression.Add(predicate);

            using (DataAccessAdapterBase adapter = new DataAccessAdapterFactory().CreateAdapter())
            {
                adapter.FetchEntityCollection(cats, filter, 0, _sort);
            }

            return cats;
        }
コード例 #2
0
        public static void Add(int artworkId, int roleId)
        {
            var entity = new ArtworkToRoleEntity();
            entity.ArtworkId = artworkId;
            entity.RoleId = roleId;

            var filter = new PredicateExpression();
            filter.Add(ArtworkToRoleFields.ArtworkId == artworkId);
            filter.Add(ArtworkToRoleFields.RoleId == roleId);
            Database.AddOrUpdateEntity(entity, filter, false);
        }
コード例 #3
0
 public string GetTodayVisit()
 {
     WebTrackerCollection trackers = new WebTrackerCollection();
     PredicateExpression filter = new PredicateExpression();
     filter.Add(WebTrackerFields.VisitTime == DateTime.Parse(DateTime.Now.ToShortDateString()));
     trackers.GetMulti(filter);
     return trackers.Count.ToString();
 }
コード例 #4
0
        /// <summary>
        /// Returns entites which validityDateTimeField is GREATER OR EQUAL than startDateTime,
        /// and LESS than endDateTime.
        public static PredicateExpression FilterValidEntities(DateTime? startDateTime,
            DateTime? endDateTime,
            EntityField2 validityDateTimeField)
        {
            PredicateExpression predicateExpression = new PredicateExpression();

            if (null != startDateTime)
            {
                predicateExpression.Add(validityDateTimeField >= startDateTime.Value);
            }

            if (null != endDateTime)
            {
                predicateExpression.Add(validityDateTimeField < endDateTime.Value);
            }

            return predicateExpression;
        }
コード例 #5
0
        public CategoryCollection GetMainCategories()
        {
            CategoryCollection categories = new CategoryCollection();
            PredicateExpression filter = new PredicateExpression();
            filter.Add(new FieldCompareNullPredicate(CategoryFields.BaseCategoryId));
            categories.GetMulti(filter);

            return categories;
        }
コード例 #6
0
ファイル: AuditActionDAO.cs プロジェクト: priaonehaha/HnD
 /// <summary>Retrieves in the calling AuditActionCollection object all AuditActionEntity objects which are related via a relation of type 'm:n' with the passed in RoleEntity.</summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
 /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingRolesWithAuditAction(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity roleInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
 {
     RelationCollection relations = new RelationCollection();
     relations.Add(AuditActionEntity.Relations.RoleAuditActionEntityUsingAuditActionID, "RoleAuditAction_");
     relations.Add(RoleAuditActionEntity.Relations.RoleEntityUsingRoleID, "RoleAuditAction_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(roleInstance.Fields[(int)RoleFieldIndex.RoleID], ComparisonOperator.Equal));
     return this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize);
 }
コード例 #7
0
        /// <summary>
        /// Returns valid entities which are valid for given moment in time.
        /// Valid entities have:
        /// 1. Begining is not NULL AND is LESS than given moment in time.
        /// 2. End is NULL OR is GREATER OR EQUAL than given moment in time.
        /// </summary>
        public static PredicateExpression FilterValidEntities(DateTime momentInTime,
            EntityField2 validFromDateTimeField,
            EntityField2 validToDateTimeField)
        {
            PredicateExpression predicateExpression = new PredicateExpression();
            predicateExpression.Add(validFromDateTimeField != DBNull.Value & validFromDateTimeField <= momentInTime);
            predicateExpression.AddWithAnd(validToDateTimeField == DBNull.Value | validToDateTimeField >= momentInTime);

            return predicateExpression;
        }
コード例 #8
0
        /// <summary>Retrieves in the calling CustomerCollection object all CustomerEntity objects which are related via a relation of type 'm:n' with the passed in ShipperEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="shipperInstance">ShipperEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingShipperCollectionViaOrder(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity shipperInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            RelationCollection relations = new RelationCollection();

            relations.Add(CustomerEntity.Relations.OrderEntityUsingCustomerId, "Order_");
            relations.Add(OrderEntity.Relations.ShipperEntityUsingShipVia, "Order_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(shipperInstance.Fields[(int)ShipperFieldIndex.ShipperId], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #9
0
        /// <summary>Retrieves in the calling UserCollection object all UserEntity objects which are related via a relation of type 'm:n' with the passed in AuditActionTypeEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="auditActionTypeInstance">AuditActionTypeEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingAuditActionTypeCollectionViaAuditInfo(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity auditActionTypeInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            RelationCollection relations = new RelationCollection();

            relations.Add(UserEntity.Relations.AuditInfoEntityUsingUserId, "AuditInfo_");
            relations.Add(AuditInfoEntity.Relations.AuditActionTypeEntityUsingAuditActionTypeId, "AuditInfo_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(auditActionTypeInstance.Fields[(int)AuditActionTypeFieldIndex.AuditActionTypeId], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #10
0
        /// <summary>Retrieves in the calling CustomerCollection object all CustomerEntity objects which are related via a relation of type 'm:n' with the passed in CustomerDemographyEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="customerDemographyInstance">CustomerDemographyEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingCustomerDemographicsCollectionViaCustomerCustomerDemo(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity customerDemographyInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            var relations = new RelationCollection();

            relations.Add(CustomerEntity.Relations.CustomerCustomerDemoEntityUsingCustomerId, "CustomerCustomerDemo_");
            relations.Add(CustomerCustomerDemoEntity.Relations.CustomerDemographyEntityUsingCustomerTypeId, "CustomerCustomerDemo_", string.Empty, JoinHint.None);
            var selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(customerDemographyInstance.Fields[(int)CustomerDemographyFieldIndex.CustomerTypeId], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #11
0
        /// <summary>Retrieves in the calling TerritoryCollection object all TerritoryEntity objects which are related via a relation of type 'm:n' with the passed in EmployeeEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="employeeInstance">EmployeeEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingEmployeesCollectionViaEmployeeTerritories(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity employeeInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            RelationCollection relations = new RelationCollection();

            relations.Add(TerritoryEntity.Relations.EmployeeTerritoryEntityUsingTerritoryId, "EmployeeTerritory_");
            relations.Add(EmployeeTerritoryEntity.Relations.EmployeeEntityUsingEmployeeId, "EmployeeTerritory_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(employeeInstance.Fields[(int)EmployeeFieldIndex.EmployeeId], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #12
0
        /// <summary>
        /// This function is used to query the data source for records.
        /// </summary>
        /// <param name="gguid">The Group GUID</param>
        /// <param name="etguid">Entity Type GUID</param>
        /// <param name="actioncode">Action code</param>
        /// <param name="allow">Allow</param>
        /// <param name="recorduid">Record UID</param>
        /// <returns>EntityCollection<GroupRecordPermissionEntity></returns>
        public static EntityCollection <GroupRecordPermissionEntity> Select(int gUid, System.Guid etguid, System.String actioncode, System.Boolean allow, System.Int32 recorduid)
        {
            PredicateExpression filter = new PredicateExpression();

            filter.Add(GroupRecordPermissionFields.GroupUID == gUid);
            filter.Add(GroupRecordPermissionFields.EntityTypeGUID == etguid);
            filter.Add(GroupRecordPermissionFields.ActionCode == actioncode);
            filter.Add(GroupRecordPermissionFields.Allow == allow);
            filter.Add(GroupRecordPermissionFields.RecordUID == recorduid);

            RelationPredicateBucket bucket = new RelationPredicateBucket();

            bucket.PredicateExpression.Add(filter);

            EntityCollection <GroupRecordPermissionEntity> permissions = new EntityCollection <GroupRecordPermissionEntity>();
            DataAccessAdapter ds = new DataAccessAdapter();

            ds.FetchEntityCollection(permissions, bucket);
            return(permissions);
        }
コード例 #13
0
ファイル: ThreadDAO.cs プロジェクト: priaonehaha/HnD
        /// <summary>Retrieves in the calling ThreadCollection object all ThreadEntity objects which are related via a relation of type 'm:n' with the passed in UserEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="userInstance">UserEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingUsersWhoPostedInThread(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity userInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            RelationCollection relations = new RelationCollection();

            relations.Add(ThreadEntity.Relations.MessageEntityUsingThreadID, "Message_");
            relations.Add(MessageEntity.Relations.UserEntityUsingPostedByUserID, "Message_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(userInstance.Fields[(int)UserFieldIndex.UserID], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #14
0
        /// <summary>Retrieves in the calling CategoryCollection object all CategoryEntity objects which are related via a relation of type 'm:n' with the passed in SupplierEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="supplierInstance">SupplierEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingSupplierCollectionViaProduct(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity supplierInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            var relations = new RelationCollection();

            relations.Add(CategoryEntity.Relations.ProductEntityUsingCategoryId, "Product_");
            relations.Add(ProductEntity.Relations.SupplierEntityUsingSupplierId, "Product_", string.Empty, JoinHint.None);
            var selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(supplierInstance.Fields[(int)SupplierFieldIndex.SupplierId], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #15
0
ファイル: ActionRightDAO.cs プロジェクト: priaonehaha/HnD
        /// <summary>Retrieves in the calling ActionRightCollection object all ActionRightEntity objects which are related via a relation of type 'm:n' with the passed in RoleEntity.</summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingSystemRightAssignedToRoles(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity roleInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
        {
            RelationCollection relations = new RelationCollection();

            relations.Add(ActionRightEntity.Relations.RoleSystemActionRightEntityUsingActionRightID, "RoleSystemActionRight_");
            relations.Add(RoleSystemActionRightEntity.Relations.RoleEntityUsingRoleID, "RoleSystemActionRight_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(roleInstance.Fields[(int)RoleFieldIndex.RoleID], ComparisonOperator.Equal));
            return(this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize));
        }
コード例 #16
0
        public ProductCollection GetSliderProducts()
        {
            ProductCollection    sliderProducts = new ProductCollection();
            PredicateExpression  filter         = new PredicateExpression();
            IPrefetchPath        prefetchPath   = new PrefetchPath((int)EntityType.ProductEntity);
            IPrefetchPathElement path           = prefetchPath.Add(ProductEntity.PrefetchPathComments);

            path.SubPath.Add(CommentEntity.PrefetchPathRate);


            filter.Add(ProductFields.IsSliderProduct == true);
            filter.Add(ProductFields.Status == true);
            sliderProducts.GetMulti(filter, prefetchPath);

            foreach (var item in sliderProducts)
            {
                int id = item.Id;
            }
            return(sliderProducts);
        }
コード例 #17
0
        /// <summary>
        /// Retrieves in the calling CountryRegionCollection object all CountryRegionEntity objects
        /// which are related via a relation of type 'm:n' with the passed in CurrencyEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="currencyInstance">CurrencyEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingCurrencyCollectionViaCountryRegionCurrency(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity currencyInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.CountryRegionEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(CountryRegionEntity.Relations.CountryRegionCurrencyEntityUsingCountryRegionCode, "CountryRegionCurrency_");
            relations.Add(CountryRegionCurrencyEntity.Relations.CurrencyEntityUsingCurrencyCode, "CountryRegionCurrency_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(currencyInstance.Fields[(int)CurrencyFieldIndex.CurrencyCode], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #18
0
        /// <summary>
        /// Retrieves in the calling CountryRegionCollection object all CountryRegionEntity objects
        /// which are related via a relation of type 'm:n' with the passed in SalesTerritoryEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="salesTerritoryInstance">SalesTerritoryEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingSalesTerritoryCollectionViaStateProvince(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity salesTerritoryInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.CountryRegionEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(CountryRegionEntity.Relations.StateProvinceEntityUsingCountryRegionCode, "StateProvince_");
            relations.Add(StateProvinceEntity.Relations.SalesTerritoryEntityUsingTerritoryID, "StateProvince_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(salesTerritoryInstance.Fields[(int)SalesTerritoryFieldIndex.TerritoryID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #19
0
        /// <summary>
        /// Retrieves in the calling CustomerViewRelatedCollection object all CustomerViewRelatedEntity objects
        /// which are related via a relation of type 'm:n' with the passed in CurrencyRateEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="currencyRateInstance">CurrencyRateEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingCurrencyRateCollectionViaSalesOrderHeader(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity currencyRateInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.CustomerViewRelatedEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(CustomerViewRelatedEntity.Relations.SalesOrderHeaderEntityUsingCustomerID, "SalesOrderHeader_");
            relations.Add(SalesOrderHeaderEntity.Relations.CurrencyRateEntityUsingCurrencyRateID, "SalesOrderHeader_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(currencyRateInstance.Fields[(int)CurrencyRateFieldIndex.CurrencyRateID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #20
0
        static IPredicateExpression GetSelectionFilter(int siteGuid)
        {
            IPredicateExpression filter = new PredicateExpression();

            filter.Add(SiteUserFields.SiteUserPassword.IsNotNull())
            .Add(SiteUserFields.HashType.Equal(HashTypeEnum.None))
            .Add(SiteUserFields.SiteGuid == siteGuid)
            .Add(SiteUserFields.SiteUserEmail.Like("%@mcb.dk%"))
            //                .Add(SiteUserFields.SiteUserPassword.Like("%MCB%"))
            .Add(SiteUserFields.SiteUserPassword.NotEqual(""));
            return(filter);
        }
コード例 #21
0
        /// <summary>
        /// Retrieves in the calling DeepFryerCollection object all DeepFryerEntity objects
        /// which are related via a relation of type 'm:n' with the passed in EmployeeEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="employeeInstance">EmployeeEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingEmployeeCollectionViaDeepFryerService(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity employeeInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Reliant.RenuOil.DAL.EntityType.DeepFryerEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(DeepFryerEntity.Relations.DeepFryerServiceEntityUsingDeepFryerId, "DeepFryerService_");
            relations.Add(DeepFryerServiceEntity.Relations.EmployeeEntityUsingServicedby, "DeepFryerService_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(employeeInstance.Fields[(int)EmployeeFieldIndex.EmployeeId], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #22
0
        public CategoryCollection GetSubCategories(int mainCatId)
        {
            CategoryCollection  subCategories = new CategoryCollection();
            PredicateExpression filter        = new PredicateExpression();
            IPrefetchPath       prefetchPath  = new PrefetchPath((int)EntityType.CategoryEntity);

            prefetchPath.Add(CategoryEntity.PrefetchPathCategories);
            filter.Add(CategoryFields.BaseCategoryId == mainCatId);
            subCategories.GetMulti(filter, prefetchPath);

            return(subCategories);
        }
コード例 #23
0
        /// <summary>
        /// Retrieves in the calling TargetCollection object all TargetEntity objects
        /// which are related via a relation of type 'm:n' with the passed in DecisionNodeEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="decisionNodeInstance">DecisionNodeEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingConditionCollectionViaTargetCondition(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity decisionNodeInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.TargetEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(TargetEntity.Relations.TargetConditionEntityUsingTargetId, "TargetCondition_");
            relations.Add(TargetConditionEntity.Relations.DecisionNodeEntityUsingConditionId, "TargetCondition_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(decisionNodeInstance.Fields[(int)DecisionNodeFieldIndex.Id], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #24
0
        /// <summary>
        /// Retrieves in the calling PolicyLinkCollection object all PolicyLinkEntity objects
        /// which are related via a relation of type 'm:n' with the passed in LibraryEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="libraryInstance">LibraryEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingLibraryCollectionViaPolicyDocument(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity libraryInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.PolicyLinkEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(PolicyLinkEntity.Relations.PolicyDocumentEntityUsingPolicyLinkId, "PolicyDocument_");
            relations.Add(PolicyDocumentEntity.Relations.LibraryEntityUsingLibraryId, "PolicyDocument_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(libraryInstance.Fields[(int)LibraryFieldIndex.Id], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #25
0
        /// <summary>
        /// Retrieves in the calling EmployeeCollection object all EmployeeEntity objects
        /// which are related via a relation of type 'm:n' with the passed in ShipMethodEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="shipMethodInstance">ShipMethodEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingShipMethodCollectionViaPurchaseOrderHeader(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity shipMethodInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.EmployeeEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(EmployeeEntity.Relations.PurchaseOrderHeaderEntityUsingEmployeeID, "PurchaseOrderHeader_");
            relations.Add(PurchaseOrderHeaderEntity.Relations.ShipMethodEntityUsingShipMethodID, "PurchaseOrderHeader_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(shipMethodInstance.Fields[(int)ShipMethodFieldIndex.ShipMethodID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #26
0
        /// <summary>
        /// Retrieves in the calling ShiftCollection object all ShiftEntity objects
        /// which are related via a relation of type 'm:n' with the passed in DepartmentEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="departmentInstance">DepartmentEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingDepartmentCollectionViaEmployeeDepartmentHistory(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity departmentInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.ShiftEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(ShiftEntity.Relations.EmployeeDepartmentHistoryEntityUsingShiftID, "EmployeeDepartmentHistory_");
            relations.Add(EmployeeDepartmentHistoryEntity.Relations.DepartmentEntityUsingDepartmentID, "EmployeeDepartmentHistory_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(departmentInstance.Fields[(int)DepartmentFieldIndex.DepartmentID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #27
0
        /// <summary>
        /// Retrieves in the calling DeepFryerServiceCollection object all DeepFryerServiceEntity objects
        /// which are related via a relation of type 'm:n' with the passed in UserEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="userInstance">UserEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingUserCollectionViaDeepFryerServiceChangeLog(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity userInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Reliant.RenuOil.DAL.EntityType.DeepFryerServiceEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(DeepFryerServiceEntity.Relations.DeepFryerServiceChangeLogEntityUsingDeepFryerServiceId, "DeepFryerServiceChangeLog_");
            relations.Add(DeepFryerServiceChangeLogEntity.Relations.UserEntityUsingEnteredByUserId, "DeepFryerServiceChangeLog_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(userInstance.Fields[(int)UserFieldIndex.UserId], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #28
0
        /// <summary>
        /// Retrieves in the calling ProductPhotoCollection object all ProductPhotoEntity objects
        /// which are related via a relation of type 'm:n' with the passed in ProductEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="productInstance">ProductEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingProductCollectionViaProductProductPhoto(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity productInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.ProductPhotoEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(ProductPhotoEntity.Relations.ProductProductPhotoEntityUsingProductPhotoID, "ProductProductPhoto_");
            relations.Add(ProductProductPhotoEntity.Relations.ProductEntityUsingProductID, "ProductProductPhoto_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(productInstance.Fields[(int)ProductFieldIndex.ProductID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #29
0
        /// <summary>
        /// Retrieves in the calling WorkOrderCollection object all WorkOrderEntity objects
        /// which are related via a relation of type 'm:n' with the passed in LocationEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="locationInstance">LocationEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingLocationCollectionViaWorkOrderRouting(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity locationInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.WorkOrderEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(WorkOrderEntity.Relations.WorkOrderRoutingEntityUsingWorkOrderID, "WorkOrderRouting_");
            relations.Add(WorkOrderRoutingEntity.Relations.LocationEntityUsingLocationID, "WorkOrderRouting_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(locationInstance.Fields[(int)LocationFieldIndex.LocationID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #30
0
        /// <summary>
        /// Retrieves in the calling ContactTypeCollection object all ContactTypeEntity objects
        /// which are related via a relation of type 'm:n' with the passed in VendorEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="vendorInstance">VendorEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingVendorCollectionViaVendorContact(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity vendorInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.ContactTypeEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(ContactTypeEntity.Relations.VendorContactEntityUsingContactTypeID, "VendorContact_");
            relations.Add(VendorContactEntity.Relations.VendorEntityUsingVendorID, "VendorContact_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(vendorInstance.Fields[(int)VendorFieldIndex.VendorID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #31
0
        /// <summary>
        /// Retrieves in the calling AttributeCollection object all AttributeEntity objects
        /// which are related via a relation of type 'm:n' with the passed in QueryEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="queryInstance">QueryEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingQueryCollectionViaQueryValue(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity queryInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.AttributeEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(AttributeEntity.Relations.QueryValueEntityUsingAttributeId, "QueryValue_");
            relations.Add(QueryValueEntity.Relations.QueryEntityUsingQueryId, "QueryValue_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(queryInstance.Fields[(int)QueryFieldIndex.Id], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #32
0
        /// <summary>
        /// Retrieves in the calling DockCollection object all DockEntity objects
        /// which are related via a relation of type 'm:n' with the passed in AccountEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="accountInstance">AccountEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingAccountCollectionViaBale(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity accountInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Reliant.RenuOil.DAL.EntityType.DockEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(DockEntity.Relations.BaleEntityUsingDockId, "Bale_");
            relations.Add(BaleEntity.Relations.AccountEntityUsingAccountId, "Bale_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(accountInstance.Fields[(int)AccountFieldIndex.AccountId], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #33
0
        /// <summary>
        /// Retrieves in the calling SalesOrderHeaderCollection object all SalesOrderHeaderEntity objects
        /// which are related via a relation of type 'm:n' with the passed in SalesReasonEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="salesReasonInstance">SalesReasonEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingSalesReasonCollectionViaSalesOrderHeaderSalesReason(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity salesReasonInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.SalesOrderHeaderEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(SalesOrderHeaderEntity.Relations.SalesOrderHeaderSalesReasonEntityUsingSalesOrderID, "SalesOrderHeaderSalesReason_");
            relations.Add(SalesOrderHeaderSalesReasonEntity.Relations.SalesReasonEntityUsingSalesReasonID, "SalesOrderHeaderSalesReason_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(salesReasonInstance.Fields[(int)SalesReasonFieldIndex.SalesReasonID], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #34
0
        /// <summary>
        /// Retrieves in the calling ServiceLocationAssetTypeCollection object all ServiceLocationAssetTypeEntity objects
        /// which are related via a relation of type 'm:n' with the passed in WorkOrderServiceLocationEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="workOrderServiceLocationInstance">WorkOrderServiceLocationEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingWorkOrderServiceLocationCollectionViaAssetReclamationService(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity workOrderServiceLocationInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Reliant.RenuOil.DAL.EntityType.ServiceLocationAssetTypeEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(ServiceLocationAssetTypeEntity.Relations.AssetReclamationServiceEntityUsingServiceLocationAssetTypeId, "AssetReclamationService_");
            relations.Add(AssetReclamationServiceEntity.Relations.WorkOrderServiceLocationEntityUsingWorkOrderServiceLocationId, "AssetReclamationService_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(workOrderServiceLocationInstance.Fields[(int)WorkOrderServiceLocationFieldIndex.WorkOrderServiceLocationId], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #35
0
        /// <summary>
        /// Retrieves in the calling AttributeCollection object all AttributeEntity objects
        /// which are related via a relation of type 'm:n' with the passed in DecisionNodeEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="decisionNodeInstance">DecisionNodeEntity object to be used as a filter in the m:n relation</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingDecisionNodeCollectionViaDecisionNode(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity decisionNodeInstance, int pageNumber, int pageSize)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.AttributeEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(AttributeEntity.Relations.DecisionNodeEntityUsingAttributeId, "DecisionNode_");
            relations.Add(DecisionNodeEntity.Relations.DecisionNodeEntityUsingParentId, "DecisionNode_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(decisionNodeInstance.Fields[(int)DecisionNodeFieldIndex.Id], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize));
        }
コード例 #36
0
        /// <summary>
        /// Retrieves in the calling RecycleServiceCollection object all RecycleServiceEntity objects
        /// which are related via a relation of type 'm:n' with the passed in RecycleTypeEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="recycleTypeInstance">RecycleTypeEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingRecycleTypeCollectionViaRecycleServiceAction(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity recycleTypeInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Reliant.RenuOil.DAL.EntityType.RecycleServiceEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(RecycleServiceEntity.Relations.RecycleServiceActionEntityUsingRecycleServiceId, "RecycleServiceAction_");
            relations.Add(RecycleServiceActionEntity.Relations.RecycleTypeEntityUsingRecycleTypeId, "RecycleServiceAction_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(recycleTypeInstance.Fields[(int)RecycleTypeFieldIndex.RecycleTypeId], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #37
0
        /// <summary>
        /// Retrieves in the calling ProductModelCollection object all ProductModelEntity objects
        /// which are related via a relation of type 'm:n' with the passed in UnitMeasureEntity.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="unitMeasureInstance">UnitMeasureEntity object to be used as a filter in the m:n relation</param>
        /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public bool GetMultiUsingUnitMeasureCollectionViaProduct(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity unitMeasureInstance, IPrefetchPath prefetchPathToUse)
        {
            IEntityFields      fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(AW.Data.EntityType.ProductModelEntity);
            RelationCollection relations      = new RelationCollection();

            relations.Add(ProductModelEntity.Relations.ProductEntityUsingProductModelID, "Product_");
            relations.Add(ProductEntity.Relations.UnitMeasureEntityUsingSizeUnitMeasureCode, "Product_", string.Empty, JoinHint.None);
            IPredicateExpression selectFilter = new PredicateExpression();

            selectFilter.Add(new FieldCompareValuePredicate(unitMeasureInstance.Fields[(int)UnitMeasureFieldIndex.UnitMeasureCode], ComparisonOperator.Equal));
            return(GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse));
        }
コード例 #38
0
        /// <summary>
        /// Returns predicate which returns single (on none) entity for given moment in time.
        /// Vraća predikat koji filtrira jedan entitet koji je validan za dani momentInTime.
        /// </summary>
        /// <param name="setFilter">Additional filter which applies before datetime predicate.</param>
        public static PredicateExpression FilterValidEntities(DateTime momentInTime,
            EntityField2 validDateTimeField,
            IPredicateExpression setFilter)
        {
            PredicateExpression newSetFilter;

            if (null != setFilter)
            {
                newSetFilter = new PredicateExpression(setFilter);
                newSetFilter.AddWithAnd(validDateTimeField <= momentInTime);
            }
            else
            {
                newSetFilter = new PredicateExpression(validDateTimeField <= momentInTime);
            }

            PredicateExpression toReturn = new PredicateExpression();
            toReturn.Add(validDateTimeField <= momentInTime);
            toReturn.Add(new FieldCompareSetPredicate(validDateTimeField, null, validDateTimeField, null, SetOperator.GreaterEqualAll, newSetFilter));

            return toReturn;
        }
コード例 #39
0
        public int DeleteByCompatibleSchemaVersion(string CompatibleSchemaVersion)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(AspnetSchemaVersionsFields.CompatibleSchemaVersion == CompatibleSchemaVersion);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("AspnetSchemaVersionsEntity", filter);
            }
            return toReturn;
        }
コード例 #40
0
        public int DeleteByDiscountName(string DiscountName)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(DiscountFields.DiscountName == DiscountName);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("DiscountEntity", filter);
            }
            return toReturn;
        }
コード例 #41
0
        public int DeleteByCreatedBy(string CreatedBy)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(OrdersFields.CreatedBy == CreatedBy);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("OrdersEntity", filter);
            }
            return toReturn;
        }
コード例 #42
0
        public int DeleteByApplicationPath(string ApplicationPath)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(AspnetWebEventEventsFields.ApplicationPath == ApplicationPath);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("AspnetWebEventEventsEntity", filter);
            }
            return toReturn;
        }
コード例 #43
0
        public int DeleteByApproved(bool Approved)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(FeedBackFields.Approved == Approved);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("FeedBackEntity", filter);
            }
            return toReturn;
        }
コード例 #44
0
        public int DeleteByBannerUrl(string BannerUrl)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(BannerFields.BannerUrl == BannerUrl);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("BannerEntity", filter);
            }
            return toReturn;
        }
コード例 #45
0
        public int DeleteByAboutContents(string AboutContents)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(SupplierRegisterFields.AboutContents == AboutContents);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("SupplierRegisterEntity", filter);
            }
            return toReturn;
        }
コード例 #46
0
        public int DeleteByAutoStart(bool AutoStart)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(VideosFields.AutoStart == AutoStart);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("VideosEntity", filter);
            }
            return toReturn;
        }
コード例 #47
0
        public int DeleteByGroupName(string GroupName)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(AdvertsPositionFields.GroupName == GroupName);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("AdvertsPositionEntity", filter);
            }
            return toReturn;
        }
コード例 #48
0
        public int DeleteByAmount(int Amount)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(ShippingDetailFields.Amount == Amount);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("ShippingDetailEntity", filter);
            }
            return toReturn;
        }
コード例 #49
0
        public int DeleteByAdvertId(Guid AdvertId)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(AdvertsGroupFields.AdvertId == AdvertId);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("AdvertsGroupEntity", filter);
            }
            return toReturn;
        }
        public IPredicateExpression CreatePredicate(ConcurrencyPredicateType predicateTypeToCreate, object containingEntity)
        {
            IPredicateExpression toReturn = null;

            if ((_doTriggerOnSave && predicateTypeToCreate == ConcurrencyPredicateType.Save) ||
                (_doTriggerOnDelete && predicateTypeToCreate == ConcurrencyPredicateType.Delete))
            {
                toReturn = new PredicateExpression();
                IEntity2 entity = (IEntity2)containingEntity;
                EntityField2 concurrencyField = (EntityField2)entity.Fields[_concurrencyFieldName];
                toReturn.Add(concurrencyField == concurrencyField.CurrentValue);
            }

            return toReturn;
        }
コード例 #51
0
        public int DeleteByIsEnable(bool IsEnable)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(PaymentMethodFields.IsEnable == IsEnable);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("PaymentMethodEntity", filter);
            }
            return toReturn;
        }
コード例 #52
0
        public int DeleteByCode(string Code)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(MarkTransferFields.Code == Code);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("MarkTransferEntity", filter);
            }
            return toReturn;
        }
コード例 #53
0
        public int DeleteByLastUpdatedDate(DateTime LastUpdatedDate)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(AspnetProfileFields.LastUpdatedDate == LastUpdatedDate);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("AspnetProfileEntity", filter);
            }
            return toReturn;
        }
コード例 #54
0
        public int DeleteByAbstract(string Abstract)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(ProductsFields.Abstract == Abstract);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("ProductsEntity", filter);
            }
            return toReturn;
        }
コード例 #55
0
        public int DeleteByCatId(int CatId)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(ProductInCatalogFields.CatId == CatId);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("ProductInCatalogEntity", filter);
            }
            return toReturn;
        }
コード例 #56
0
        public int DeleteByRoleId(Guid RoleId)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(AspnetUsersInRolesFields.RoleId == RoleId);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("AspnetUsersInRolesEntity", filter);
            }
            return toReturn;
        }
コード例 #57
0
        public int DeleteByCommissionPercent(double CommissionPercent)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(ProductInfoFields.CommissionPercent == CommissionPercent);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("ProductInfoEntity", filter);
            }
            return toReturn;
        }
コード例 #58
0
        public int DeleteByIsFullAccess(bool IsFullAccess)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(SupplierAccountFields.IsFullAccess == IsFullAccess);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("SupplierAccountEntity", filter);
            }
            return toReturn;
        }
コード例 #59
0
        public int DeleteById(Guid Id)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(NewsletterInProductFields.Id == Id);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("NewsletterInProductEntity", filter);
            }
            return toReturn;
        }
コード例 #60
0
        public int DeleteByCountDown(int CountDown)
        {
            int toReturn = 0;
            RelationPredicateBucket filter = new RelationPredicateBucket();

            IPredicateExpression _PredicateExpression = new PredicateExpression();
            _PredicateExpression.Add(DocumentFields.CountDown == CountDown);
            filter.PredicateExpression.Add(_PredicateExpression);

            using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                toReturn = adapter.DeleteEntitiesDirectly("DocumentEntity", filter);
            }
            return toReturn;
        }