public ProductGroupRule GetRule(ProductGroupRule rule) { ProductGroupRule readedRule = this.GetRules().Find((x) => x.Equals(rule)); if (readedRule != null) { return readedRule; } else { throw new ProductManagementException(ProductManagementException.Msg.InvalidCategoryRule, rule.Id, this.Id); } }
public void RemoveRule(ProductGroupRule rule) { ProductGroupRule readedRule = this.GetRule(rule); readedRule.Status = GeneralObjectStatus.Deleted; readedRule.Save(); }