Example #1
0
        //根目录资金账户
        private void GetBankAccounts()
        {
            RTVBankAccounts.Nodes.Clear();
            var filiales = CacheCollection.Filiale.GetHostingAndSaleFilialeList();

            foreach (var filialeInfo in filiales)
            {
                FilialeInfo info         = filialeInfo;
                var         tempSumMoney = BankAccountBalanceList.Where(ent => ent.TargetId == info.ID).Sum(ent => ent.NonceBalance);
                RadTreeNode rootNode     = CreateNode(filialeInfo.Name + "[" + tempSumMoney.ToString("N") + "]", true, filialeInfo.ID.ToString(), "Filiale");
                RecursivelyBankAccounts(rootNode, filialeInfo.ID);
                rootNode.Selected = true;
                rootNode.PostBack = true;
                RTVBankAccounts.Nodes.Add(rootNode);
                RecursivelySalePlatform(rootNode, filialeInfo.ID);
            }
            var personnelInfo = CurrentSession.Personnel.Get();
            IList <BankAccountInfo> bankAccountsListByNotIsMain = _bankAccounts.GetBankAccountsListByNotIsMain(personnelInfo.FilialeId, personnelInfo.BranchId, personnelInfo.PositionId);
            RadTreeNode             rootNodeElse = CreateNode("ERP[" + bankAccountsListByNotIsMain.Sum(ent => ent.NonceBalance).ToString("N") + "]", false, _reckoningElseFilialeid.ToString(), "Filiale");

            foreach (var info in bankAccountsListByNotIsMain)
            {
                var childNode = CreateNode((info.IsUse ? "" : "【停用】") + info.BankName + " - " + info.AccountsName + "[" + info.NonceBalance.ToString("N") + "]", false,
                                           info.BankAccountsId.ToString(), "BankAccount");
                rootNodeElse.Nodes.Add(childNode);
            }
            RTVBankAccounts.Nodes.Add(rootNodeElse);
        }