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

namespace CallCenterApi.BLL
{
    public class T_Call_PageTemp
    {
        private readonly DAL.T_Call_PageTemp dal = new DAL.T_Call_PageTemp();
        private readonly DAL.T_Call_PageField dalPageField = new DAL.T_Call_PageField();
        public T_Call_PageTemp()
        { }

        #region  Method
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Model.T_Call_PageTemp model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 修改一条数据
        /// </summary>
        public bool Update(Model.T_Call_PageTemp model)
        {
            return dal.Update(model) > 0;
        }

        /// <summary>
        /// 获取一条数据
        /// </summary>
        public Model.T_Call_PageTemp GetModel(int id)
        {
            return dal.GetModel(id);
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int F_Id)
        {
            dalPageField.DeleteByTempId(F_Id);
            dal.Delete(F_Id);
            return true;
        }
        #endregion  Method
    }
}
