Beispiel #1
0
        public IActionResult Statistics()
        {
            HomeStatisticsViewModel model = new HomeStatisticsViewModel();

            model.LoadModelData(_unitOfWork);
            return(View(model));
        }
Beispiel #2
0
        public IActionResult Index()
        {
            HomeStatisticsViewModel hmvm = new HomeStatisticsViewModel();

            try
            {
                var result  = _bankAccount.GetPaystackBalance();
                var result2 = _recipent.GetAllRecipents();
                var result3 = _transfer.GetAllTransfers();

                hmvm.Balance          = result.Result.Result.data.First();
                hmvm.RecipentCount    = result2.Result.Result.data.Count();
                hmvm.TransactionCount = result3.Result.Result.data.Count();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View(hmvm));
        }
Beispiel #3
0
        public ActionResult Statistics()
        {
            var model = new HomeStatisticsViewModel();
            model.StatisticsItems = new List<Statistics>();

            var Statistics = _dataContext.StatisticsItemValues
                .OrderBy(m=>m.SortOrder)
                .ToList();

            foreach(var StatisticsItem in Statistics)
            {
                model.StatisticsItems.Add(
                    new Statistics
                    {
                        StatisticId = StatisticsItem.StatisticId,
                        Description = StatisticsItem.Description,
                        Units = StatisticsItem.Units,
                        Value = StatisticsItem.Value,
                        SortOrder = StatisticsItem.SortOrder
                    });
            }

            return PartialView(model);
        }