Example #1
0
        public List <StatisticsPerTransactionTypeDTO> GetDashboardStatisticsPerTransactionTypePerCurrentMonth()
        {
            var currentMonthStatisticsPerTransactionType = new List <StatisticsPerTransactionTypeDTO>();
            var transactionTypes = _transactionTypeRepo.GetAllList();

            foreach (var transactionType in transactionTypes)
            {
                var statistic = new StatisticsPerTransactionTypeDTO();
                statistic.TransactionType = transactionType.Name;
                var detectedFraudsPerMonth            = _transactionRepo.Find(t => t.TransactionType.Equals(transactionType.Name) && t.Class.Equals(0)).Count;
                var numberOfIncorrectlyDetectedFrauds = _transactionRepo.Find(t => (t.Class.Equals(0) && t.Prediction.Equals(1)) ||
                                                                              (t.Class.Equals(1) && t.Prediction.Equals(0))).Count;

                statistic.NumberOfDetectedFraudsPerMonth            = detectedFraudsPerMonth;
                statistic.NumberOfIncorrectlyDetectedFrauds         = numberOfIncorrectlyDetectedFrauds;
                statistic.NumberOfSuccessfullyProcessedTransactions = statistic.NumberOfDetectedFraudsPerMonth + statistic.NumberOfIncorrectlyDetectedFrauds;

                currentMonthStatisticsPerTransactionType.Add(statistic);
            }

            return(currentMonthStatisticsPerTransactionType);
        }
Example #2
0
        public List <StatisticsPerCardVendorDTO> GetDashboardStatisticsPerCardVendorPerCurrentMonth()
        {
            var currentMonthStatisticsPerCardVendor = new List <StatisticsPerCardVendorDTO>();
            var cardVendors = _cardVendorRepo.GetAllList();

            foreach (var cardVendor in cardVendors)
            {
                var statistic = new StatisticsPerCardVendorDTO();
                statistic.CardVendor = cardVendor.Name;
                var detectedFraudsPerMonth            = _transactionRepo.Find(t => t.CardVendor.Equals(cardVendor.Name) && t.Class.Equals(0)).Count;
                var numberOfIncorrectlyDetectedFrauds = _transactionRepo.Find(t => (t.Class.Equals(0) && t.Prediction.Equals(1)) ||
                                                                              (t.Class.Equals(1) && t.Prediction.Equals(0))).Count;

                statistic.NumberOfDetectedFraudsPerMonth            = detectedFraudsPerMonth;
                statistic.NumberOfIncorrectlyDetectedFrauds         = numberOfIncorrectlyDetectedFrauds;
                statistic.NumberOfSuccessfullyProcessedTransactions = statistic.NumberOfDetectedFraudsPerMonth + statistic.NumberOfIncorrectlyDetectedFrauds;

                currentMonthStatisticsPerCardVendor.Add(statistic);
            }

            return(currentMonthStatisticsPerCardVendor);
        }
 public List <ClientCountryDTO> GetClientCountries()
 {
     return(_clientCountryRepo.GetAllList());
 }
 public List <TransactionTypeDTO> GetTransactionTypes()
 {
     return(_transactionTypeRepo.GetAllList());
 }
 public List <CardTypeDTO> GetCardTypes()
 {
     return(_cardTypeRepo.GetAllList());
 }
 public List <CardVendorDTO> GetCardVendors()
 {
     return(_cardVendorRepo.GetAllList());
 }