Пример #1
0
        public SystemDictionaryEntity FindMaxOrderItemByGroupID(SystemDictionaryGroupEntity dictionaryGroup)
        {
            NHibernateDynamicQueryGenerator <SystemDictionaryEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SYSTEMDICTIONARYGROUPID.Eq(dictionaryGroup));

            dynamicQueryGenerator.AddOrderBy(PROPERTY_SYSTEMDICTIONARYORDER.Desc());

            return(this.FindSingleEntityByQueryBuilder(dynamicQueryGenerator));
        }
Пример #2
0
        public List <SystemDictionaryEntity> FindAllByGroupIdAndOrder()
        {
            NHibernateDynamicQueryGenerator <SystemDictionaryEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SYSTEMDICTIONARYISENABLE.Eq(true));

            dynamicQueryGenerator.AddOrderBy(PROPERTY_SYSTEMDICTIONARYGROUPID.Asc());

            dynamicQueryGenerator.AddOrderBy(PROPERTY_SYSTEMDICTIONARYORDER.Asc());

            return(this.FindListByQueryBuilder(dynamicQueryGenerator));
        }
Пример #3
0
        /// <summary>
        /// 根据字典类别和字典的key值获取字典项(字典必须可用)
        /// </summary>
        /// <param name="categoryName"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SystemDictionaryEntity GetDictionaryByGroupIDAndKey(SystemDictionaryGroupEntity dictionaryGroup, string key)
        {
            NHibernateDynamicQueryGenerator <SystemDictionaryEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SYSTEMDICTIONARYGROUPID.Eq(dictionaryGroup));

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SYSTEMDICTIONARYISENABLE.Eq(true));

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SYSTEMDICTIONARYKEY.Eq(key));

            return(this.FindSingleEntityByQueryBuilder(dynamicQueryGenerator));
        }