Пример #1
0
        public JsonResult GetMonthlyGasSummaryByYear(int year)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetRollingTwelveMonthGasSummary();

            return(Json(result, new Newtonsoft.Json.JsonSerializerSettings {
                ContractResolver = new DefaultContractResolver()
            }));
        }
Пример #2
0
        public JsonResult GetAccountTransactionByAccountTransactionId(int accountTransactionId)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetAccountTransactionByAccountTransactionId(accountTransactionId);

            return(Json(result, new Newtonsoft.Json.JsonSerializerSettings {
                ContractResolver = new DefaultContractResolver()
            }));
        }
Пример #3
0
        public IActionResult CurrentMonthTransactions()
        {
            CurrentMonthTransactionsViewModel currentMonthTransactionsViewModel = new CurrentMonthTransactionsViewModel(_appConfiguration, HttpContext.Request);

            AccountTransactionFacade accountTransactionFacade = new AccountTransactionFacade(_appConfiguration, _memoryCache);

            currentMonthTransactionsViewModel.Data             = accountTransactionFacade.GetCurrentMonthAccountTransactions();
            currentMonthTransactionsViewModel.TransactionTypes = accountTransactionFacade.GetTransactionTypes();

            return(View(currentMonthTransactionsViewModel));
        }
Пример #4
0
        public IActionResult AddAccountTransaction()
        {
            AddAccountTransactionViewModel addAccountTransactionViewModel = new AddAccountTransactionViewModel(_appConfiguration, HttpContext.Request);

            AccountTransactionFacade accountTransactionFacade = new AccountTransactionFacade(_appConfiguration, _memoryCache);

            addAccountTransactionViewModel.TransactionTypes = accountTransactionFacade.GetTransactionTypes();



            return(View(addAccountTransactionViewModel));
        }
Пример #5
0
        public IActionResult AllAccountTransactions()
        {
            BudgetDashboardViewModel budgetDashboardViewModel = new BudgetDashboardViewModel();
            AccountTransactionFacade accountTransactionFacade = new AccountTransactionFacade(_appConfiguration, _memoryCache);

            budgetDashboardViewModel.TransactionTypes = accountTransactionFacade.GetTransactionTypes();

            string transactionType = budgetDashboardViewModel.TransactionTypes.Where(x => x.IsDefault).First().Name;

            if (HttpContext.Request.QueryString.HasValue)
            {
                if (HttpContext.Request.QueryString.Value.Contains("TransactionType"))
                {
                }
            }


            budgetDashboardViewModel.AccountTransactions = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetAccountTransactionsOrderByDateDescending();


            return(View(budgetDashboardViewModel));
        }
Пример #6
0
        public JsonResult GetTransactionSourcesByLookupValue(string lookupValue)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetTransactionSources(lookupValue);

            return(Json(result));
        }
Пример #7
0
        public void UpdateAccountTransaction(UpdateAccountTransactionPayload payloadData)
        {
            AccountTransactionFacade accountTransactionFacade = new AccountTransactionFacade(_appConfiguration, _memoryCache);

            accountTransactionFacade.UpdateAccountTransaction(payloadData);
        }
Пример #8
0
        public JsonResult GetGasSpendingDetailsByYearAndMonth(int year, int month)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetGasSpendingDetailsByYearAndMonth(year, month);

            return(Json(result));
        }
Пример #9
0
        public JsonResult GetTransactionsByTransactionSourceIdTransactionTypeIdMonthYear(int transactionSourceId, int transactionTypeId, int month, int year)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetTransactionsByTransactionSourceIdTransactionTypeIdMonthYear(transactionSourceId, transactionTypeId, month, year);

            return(Json(result));
        }
Пример #10
0
        public JsonResult GetDebitCreditTotalsGroupByMonthByYear(int year)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetDebitCreditTotalsGroupByMonthByYear();

            return(Json(result));
        }
Пример #11
0
        public JsonResult GetYearlyTransactionSourceSummary(int year)
        {
            var result = new AccountTransactionFacade(_appConfiguration, _memoryCache).GetYearlyTransactionSourceSummary(year);

            return(Json(result));
        }
 internal AccountTransactionBuilder(AccountTransactionResult accountTransactionResult, AccountTransactionFacade accountTransactionFacade)
 {
     _accountTransactionFacade = accountTransactionFacade;
     _accountTransactionResult = accountTransactionResult;
 }