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

using V2.Common;
using V2.PaidTimeOffDAL.Framework;

namespace V2.PaidTimeOffBLL.Framework
{
    public class ENTBaseQueryBO<T, R> 
        where T : ENTBaseQueryData<R>, new()        
    {
        public object[] GetCustomAttributes()
        {
            return typeof(T).GetCustomAttributes(false);
        }
        
        public List<LookupData> GetLookup(string lookupFieldName, string valueField)
        {
            T reportData = new T();
            return reportData.GetLookup(lookupFieldName, valueField);
        }

        public virtual object[] Select(string whereClause)
        {
            T reportData = new T();
            return (object[])(object)reportData.Run(whereClause).ToArray();
        }
    }
}
