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

namespace Service.Implement
{
	public class AlarmSettingManager : GenericManagerBase<AlarmSetting>, IAlarmSettingManager
	{
        public IList<AlarmSetting> LoadAll(char type)
		{
            return ((IAlarmSettingRepository)CurrentRepository).LoadAll(type).ToList();
		}

        public AlarmSetting Get(int hotelID, string code)
        {
            return ((IAlarmSettingRepository)CurrentRepository).LoadAll().FirstOrDefault(r => r.HotelID == hotelID && r.Code == code);
        }

        public AlarmSetting Get(int hotelID, char type, string code)
		{
			return ((IAlarmSettingRepository)CurrentRepository).Get(hotelID, type, code);
		}
	}
}
