using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace Service.Implement
{
    public class RoomCardManager : GenericManagerBase<RoomCard>, IRoomCardManager
    {
        public IList<RoomCard> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
        {
            return ((Dao.IRoomCardRepository)(this.CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort, hotelID).ToList();
        }

        public RoomCard GetByCarNumber(string cardNumber, int hotelID)
        {
            return ((Dao.IRoomCardRepository)(this.CurrentRepository)).GetByCarNumber(cardNumber, hotelID); //.LoadAll().FirstOrDefault(r => r.CardNumber == cardNumber && r.HotelID == hotelID);
        }
    }
}
