public IList <IResultValues> GetContractPartySummaryList(ICodeIndex contract, uint summaryCode) { var resultsList = __results.Where(x => ResultListUtils.IsEqualToContractParty(contract, x.Key) && ResultListUtils.SummaryArticlesFilter(x.Value.Article(), summaryCode)). Select(c => c.Value.Values()).ToArray(); return(resultsList); }
public int CompareTo(ICodeIndex otherIndex) { if (this.Code() != otherIndex.Code()) { return(this.Code().CompareTo(otherIndex.Code())); } return(this.CodeOrder().CompareTo(otherIndex.CodeOrder())); }
public IList <IResultValues> GetContractPartyResultList(ICodeIndex contract, uint articleCode) { var resultsList = __results.Where(x => ResultListUtils.IsEqualToContractParty(contract, x.Key) && x.Key.Code() == articleCode). Select(c => c.Value.Values()).ToList(); return(resultsList); }
public IResultValues GetContractResult(ICodeIndex contract) { var resultsList = __results.Where(x => ResultListUtils.IsEqualToContractArticle(contract, x.Key)). Select(c => c.Value.Values()).ToArray(); var partyResult = resultsList.DefaultIfEmpty(ResultValues.GetEmpty()).FirstOrDefault(); return(partyResult); }
public static decimal GetSummaryPaymentAmount(IResultStream results, ICodeIndex contract, uint articleCode) { var resultList = results.GetContractPartySummaryList(contract, articleCode); var resultAmounts = resultList.Select(x => x.AmountPayments()).ToArray(); var resultValue = resultAmounts.Aggregate(0m, (agr, x) => (decimal.Add(agr, x))); return(resultValue); }
public override bool Equals(object other) { if (other == this) { return(true); } if (other == null || this.GetType() != other.GetType()) { return(false); } ICodeIndex otherIndex = other as ICodeIndex; return(this.isEqualToIndex(otherIndex)); }
public static bool IsEqualToContractParty(ICodeIndex contract, IBookIndex element) { return(element.ContractIndex().Equals(contract)); }
public static bool IsEqualToContractArticle(ICodeIndex contract, IBookIndex element) { return(element.GetIndex().Equals(contract)); }
public BookParty(ICodeIndex contractIndex, ICodeIndex positionIndex) { this.__contractIndex = contractIndex; this.__positionIndex = positionIndex; }
public static uint GetContractDayEnds(IResultStream results, ICodeIndex contract) { var contractResult = results.GetContractResult(contract); return(contractResult.PeriodDayEndsOrdinal()); }
public BookIndex(ICodeIndex contractIndex, ICodeIndex positionIndex, uint code, uint codeOrder) : base(contractIndex, positionIndex) { this.__index = new CodeIndex(code, codeOrder); }
public BookIndex(IBookParty party, uint code, uint codeOrder) : base(party.ContractIndex(), party.PositionIndex()) { this.__index = new CodeIndex(code, codeOrder); }
public bool isEqualToIndex(ICodeIndex other) { return(this.Code() == other.Code() && this.CodeOrder() == other.CodeOrder()); }
public int CompareTo(object other) { ICodeIndex otherIndex = other as ICodeIndex; return(CompareTo(otherIndex)); }