예제 #1
0
        /// <summary>
        /// قوانین یک دسته نوع قانون مثلا اضافه کار را برمیگرداند
        /// </summary>
        /// <param name="ruleTypeId"></param>
        /// <returns></returns>
        public IList <Rule> GetAllRules(decimal ruleTypeId)
        {
            RuleRepository repository = new RuleRepository(false);
            IList <Rule>   list       = repository.GetByCriteria(new CriteriaStruct(Utility.GetPropertyName(() => new Rule().TypeId), ruleTypeId)
                                                                 , new CriteriaStruct(Utility.GetPropertyName(() => new Rule().Category), workingRuleCategory));

            if (list != null && list.Count > 0)
            {
                list = list.OrderBy(x => x.IdentifierCode).ToList();
            }
            return(list);
        }