コード例 #1
0
        private void SetGetGlActViewBags(AccountConfiguration accountConfiguration)
        {
            var allassets    = configLogic.ExtractAssetGLs();
            var allincome    = configLogic.ExtractIncomeGLs();
            var allexpense   = configLogic.ExtractExpenseGLs();
            var allliability = configLogic.ExtractLiabilityGLs();

            ViewBag.CurrentCotIncomeGlID       = new SelectList(allincome, "ID", "AccountName", accountConfiguration.CurrentCotIncomeGlID == null ? 0 : accountConfiguration.CurrentCotIncomeGlID);
            ViewBag.CurrentInterestExpenseGlID = new SelectList(allexpense, "ID", "AccountName", accountConfiguration.CurrentInterestExpenseGlID == null ? 0 : accountConfiguration.CurrentInterestExpenseGlID);
            ViewBag.LoanInterestExpenseGLID    = new SelectList(allexpense, "ID", "AccountName", accountConfiguration.LoanInterestExpenseGLID == null ? 0 : accountConfiguration.LoanInterestExpenseGLID);
            ViewBag.LoanInterestIncomeGlID     = new SelectList(allincome, "ID", "AccountName", accountConfiguration.LoanInterestIncomeGlID == null ? 0 : accountConfiguration.LoanInterestIncomeGlID);
            ViewBag.LoanInterestReceivableGlID = new SelectList(allassets, "ID", "AccountName", accountConfiguration.LoanInterestReceivableGlID == null ? 0 : accountConfiguration.LoanInterestReceivableGlID);
            ViewBag.SavingsInterestExpenseGlID = new SelectList(allexpense, "ID", "AccountName", accountConfiguration.SavingsInterestExpenseGlID == null ? 0 : accountConfiguration.SavingsInterestExpenseGlID);
            ViewBag.SavingsInterestPayableGlID = new SelectList(allliability, "ID", "AccountName", accountConfiguration.SavingsInterestPayableGlID == null ? 0 : accountConfiguration.SavingsInterestPayableGlID);
        }
コード例 #2
0
        private void SetGetGlActViewBags(AccountConfiguration accountConfiguration)
        {
            var allassets    = configLogic.ExtractAssetGLs();
            var allincome    = configLogic.ExtractIncomeGLs();
            var allexpense   = configLogic.ExtractExpenseGLs();
            var allliability = configLogic.ExtractLiabilityGLs();

            //var allCurrentLiability = allliability.Where(g => g.GlCategory.Name.ToLowerInvariant().Contains("current")).ToList();
            //var x = allliability.Where(g => g.GlCategory.Name.ToLowerInvariant().Contains("savings")).ToList();
            //var allSavingsLiability = allliability.Where(g => g.GlCategory.Name.ToLowerInvariant().Contains("savings")).ToList();

            ViewBag.CurrentCotIncomeGlID       = new SelectList(allincome, "ID", "AccountName", accountConfiguration.CurrentCotIncomeGlID == null ? 0 : accountConfiguration.CurrentCotIncomeGlID);
            ViewBag.CurrentInterestExpenseGlID = new SelectList(allexpense, "ID", "AccountName", accountConfiguration.CurrentInterestExpenseGlID == null ? 0 : accountConfiguration.CurrentInterestExpenseGlID);
            ViewBag.CurrentInterestPayableGlID = new SelectList(allliability, "ID", "AccountName", accountConfiguration.CurrentInterestPayableGlID == null ? 0 : accountConfiguration.CurrentInterestPayableGlID);
            ViewBag.LoanInterestExpenseGLID    = new SelectList(allexpense, "ID", "AccountName", accountConfiguration.LoanInterestExpenseGLID == null ? 0 : accountConfiguration.LoanInterestExpenseGLID);
            ViewBag.LoanInterestIncomeGlID     = new SelectList(allincome, "ID", "AccountName", accountConfiguration.LoanInterestIncomeGlID == null ? 0 : accountConfiguration.LoanInterestIncomeGlID);
            ViewBag.LoanInterestReceivableGlID = new SelectList(allassets, "ID", "AccountName", accountConfiguration.LoanInterestReceivableGlID == null ? 0 : accountConfiguration.LoanInterestReceivableGlID);
            ViewBag.SavingsInterestExpenseGlID = new SelectList(allexpense, "ID", "AccountName", accountConfiguration.SavingsInterestExpenseGlID == null ? 0 : accountConfiguration.SavingsInterestExpenseGlID);
            ViewBag.SavingsInterestPayableGlID = new SelectList(allliability, "ID", "AccountName", accountConfiguration.SavingsInterestPayableGlID == null ? 0 : accountConfiguration.SavingsInterestPayableGlID);
        }