Esempio n. 1
0
        //public Result<List<HistoryTransaction>> GetTransactions(int startIndex, int endIndex, int customer_id, int restaurant_id, DateTime fromDate, DateTime toDate)
        //{
        //    var repo = GoEatRepo.Instance;
        //    using (var db = repo.OpenConnectionFromPool())
        //    {
        //        return repo.GetTransactions(db, startIndex, endIndex, customer_id, restaurant_id, fromDate, toDate);
        //    }
        //}

        //public Result<List<HistoryTransaction>> GetTransactions(int startIndex, int endIndex, int userId, int restaurantId)
        //{
        //    var repo = GoEatRepo.Instance;
        //    using (var db = repo.OpenConnectionFromPool())
        //    {
        //        return repo.GetTransactions(db, startIndex, endIndex, userId, restaurantId);
        //    }
        //}

        /// <summary>
        /// get total row for admin
        /// </summary>
        /// <returns></returns>
        public int CountAdminTransactions(int restaurantId, GoEat.Models.TransactionStatus status)
        {
            var repo = GoEatRepo.Instance;
            using (var db = repo.OpenConnectionFromPool())
            {
                return repo.CountAdminTransactions(db, restaurantId, (int)status);
            }
        }
Esempio n. 2
0
 public Result<List<HistoryTransaction>> GetTransactions(int startIndex, int endIndex, int restaurantId,
     GoEat.Models.TransactionStatus status)
 {
     var repo = GoEatRepo.Instance;
     using (var db = repo.OpenConnectionFromPool())
     {
         return repo.GetTransactions(db, startIndex, endIndex, restaurantId, (int)status);
     }
 }