//public dynamic GetAllPurchaseReportByDate(DateTime fromDate, DateTime toDate)
        //{

        //    PurchaseRepository repo = new PurchaseRepository();
        //    var listPurchase = repo.GetAllPurchaseReportByDate(fromDate, toDate);
        //    return listPurchase;
        //}


        public dynamic GetAllPurchaseReportByDate(DateTime fromDate, DateTime toDate, string supplierName)
        {
            dynamic            listPurchase = 0;
            PurchaseRepository repo         = new PurchaseRepository();

            if (supplierName != "")
            {
                listPurchase = repo.GetAllPurchaseReportByDateAndSuppier(fromDate, toDate, supplierName);
            }
            else
            {
                listPurchase = repo.GetAllPurchaseReportByDate(fromDate, toDate);
            }

            return(listPurchase);
        }