private void handleThisTypeNode(TypeNode tNode) { byte cat = tNode.Catagory; // Fill with account Names by type foreach (var item in DBquery.getAccountNamesByCatagoryAndType(cat, tNode.TypeID)) { tNode.Nodes.Add(new AccountNode(cat, item.ID, item.Name, item.Envelopes)); } // If this is an account add in the balances if (cat == SpclAccountCat.ACCOUNT) { foreach (var item in DBquery.getAccountBalancesByType(cat, tNode.TypeID)) { this.updateBalanceRecurse(tNode, item.ID, SpclEnvelope.NULL, item.Balance); } } this.setErrorFlag(tNode); }