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

namespace Service.Implement
{
    public class HostModalRecordManager : GenericManagerBase<HostModalRecord>, IHostModalRecordManager
    {
        public IList<HostModalRecord> LoadByHostID(int hostID, string modalAddress = "")
        {
            return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadByHostID(hostID, modalAddress).ToList();
        }

        public DataTable LoadHostModalRecords(out long total, int page, int rows, string order, string sort, string roomNumber, string deviceTypes, string deviceSubtypes, string startTime, string endTime, int hotelID)
        {
            CommonEntity.DataTongJi.InvokeCount("LoadHostModalRecords_");
            return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadHostModalRecords(out total, page, rows, order, sort, roomNumber, deviceTypes, deviceSubtypes, startTime, endTime, hotelID);
        }

        public IList<string> LoadRoomNumbers(int hotelID)
        {
            return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadRoomNumbers(hotelID);
        }

        public DataTable LoadModals(string roomNumber, int hotelID)
        {
            return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadModals(roomNumber, hotelID);
        }

        public HostModalRecord GetLastHostModalRecord(int hostId, int roomTypeModalId)
        {
            return ((Dao.IHostModalRecordRepository)CurrentRepository).GetLastHostModalRecord(hostId, roomTypeModalId);
        }
    }
}
