public void ShowElement(IAccountingElement iElmt, TreeViewMappingElement tvme = null, Dictionary <string, double?> lastTotal = null) { if (tvme == null) { tvme = _Memory; } else { _Memory = tvme; } SetLastTotalMemoryAmount(lastTotal); Rows.Clear(); foreach (IAccountingElement item in iElmt.GetItemList(tvme)) { AddRow(item, iElmt.CcyRef, lastTotal: GetLastTotalMemoryAmount(item.GetName())); } AddRow(iElmt.GetTotalAccount(FXMarketUsed, AssetMarketUsed, iElmt.CcyRef, overrideName: "Total", lastTotal: GetLastTotalMemoryAmount()), isTotalRow: iElmt.GetNodeType() != NodeType.Account); ElementShowed = iElmt; TotalShowed = null; Rows[0].Cells[0].Selected = false; }
private void AddRow(IAccountingElement item, ICcyAsset convCcy, bool isTotal = false, double?lastTotal = null) { IAccount sum = item.GetTotalAccount(FXMarketUsed, AssetMarketUsed, convCcy, item.GetName(), lastTotal: lastTotal); AddRow(sum, isTotal); }