public List <Rules> GetAll() { var result = new List <Rules>(); var res = _rulesService.GetRules(1); foreach (var item in res) { var conditions = new List <Conditions>(); foreach (var condition in item.Conditions) { conditions.Add(new Conditions() { Amount = condition.Amount, ISConditions = condition.ISConditions }); } result.Add(new Rules() { Conditions = conditions, AdditionAmount = item.AdditionAmount, Amount = item.Amount, DeductionAmount = item.DeductionAmount, IsFixedFigure = item.IsFixedFigure, IsRelatedTo = item.IsRelatedTo, SalaryItem = new SalaryItem() { Name = item.SalaryItem.Name, Descriptions = item.SalaryItem.Descriptions } }); } return(result); }
public async Task <GetRulesResult> Handle(GetRulesQuery request, CancellationToken cancellationToken) { var globalRules = await _globalRulesService.GetAllRules(); if (globalRules.Any()) { return(new GetRulesResult { GlobalRules = globalRules }); } var rules = await _rulesService.GetRules(); return(new GetRulesResult { Rules = rules }); }
private void OnTradingRulesChanged() { Rules = rulesService.GetRules(ServiceName); RulesConfig = Rules.GetConfiguration <TradingRulesConfig>(); }
private void OnSignalRulesChanged() { Rules = rulesService.GetRules(ServiceName); RulesConfig = Rules.GetConfiguration <SignalRulesConfig>(); }
private void OnSignalRulesChanged() { this.Rules = rulesService.GetRules(this.ServiceName); this.RulesConfig = this.Rules.GetConfiguration <SignalRulesConfig>(); }
public async Task <OperationResult> GetRules(NotificationListRequestModel requestModel) { return(await _rulesService.GetRules(requestModel)); }