Example #1
0
        public List <Payment> GetPaymentByTypeID(byte paymentTypeID)
        {
            List <Payment> payment = new List <Payment>();

            foreach (Payment item in _paymentManagement.GetAllPayments())
            {
                if (paymentTypeID == item.PaymentTypeID)
                {
                    payment.Add(item);
                }
            }
            return(payment);
        }
        public string GetCount(string Entity)
        {
            int result = 0;

            switch (Entity)
            {
            case "Dictionary":
                _dictionaryManagement = new DictionaryManagement();
                result = _dictionaryManagement.GetAllWords().Count();
                break;

            case "Practice":
                _practiceManagement = new PracticeManagement();
                result = _practiceManagement.GetAllPractices().Count();
                break;

            case "PracticeDetail":
                _practiceDetailManagement = new PracticeDetailManagement();
                result = _practiceDetailManagement.GetAllPracticeDetails().Count();
                break;

            case "User":
                _userManagement = new UserManagement();
                result          = _userManagement.GetAllUser().Count();
                break;

            case "WordPool":
                _wordPoolManagement = new WordPoolManagement();
                result = _wordPoolManagement.GetAllWordPools().Count();
                break;

            case "WordPoolDetail":
                _wordPoolDetailManagement = new WordPoolDetailManagement();
                result = _wordPoolDetailManagement.GetAllWordPoolDetail().Count();
                break;

            case "Payment":
                _paymentManagement = new PaymentManagement();
                result             = _paymentManagement.GetAllPayments().Count();
                break;

            default:
                break;
            }
            return(result.ToString());
        }
 public List <Payment> GetPayments()
 {
     return(_paymentManagement.GetAllPayments());
 }