using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CallCenterApi.BLL
{
    public class T_CTI_TaskPhonePart
    {
        private readonly DAL.T_CTI_TaskPhonePart dal = new DAL.T_CTI_TaskPhonePart();

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Model.T_CTI_TaskPhonePart> DataTableToList(DataTable dt)
        {
            List<Model.T_CTI_TaskPhonePart> modelList = new List<Model.T_CTI_TaskPhonePart>();
            int rowsCount = dt.Rows.Count;
            if (rowsCount > 0)
            {
                Model.T_CTI_TaskPhonePart model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = dal.DataRowToModel(dt.Rows[n]);
                    if (model != null)
                    {
                        modelList.Add(model);
                    }
                }
            }
            return modelList;
        }
    }
}
