using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;

namespace ConstructorApp.BusinessLayer.Concrete
{
    public class WorkProcessManager : IWorkProcessService
    {
        private readonly IWorkProcessDal _workProcessDal;

        public WorkProcessManager(IWorkProcessDal workProcessDal)
        {
            _workProcessDal = workProcessDal;
        }

        public void TAdd(WorkProcess entity)
        {
           _workProcessDal.Add(entity);
        }

        public void TDelete(WorkProcess entity)
        {
           _workProcessDal.Delete(entity);
        }

        public WorkProcess TGetByID(int id)
        {
            return _workProcessDal.GetByID(id);
        }

        public List<WorkProcess> TGetListAll()
        {
            return _workProcessDal.GetListAll();
        }

        public void TServiceStatusActive(int id)
        {
            _workProcessDal.ServiceStatusActive(id);
        }

        public void TServiceStatusPassive(int id)
        {
            _workProcessDal.ServiceStatusPassive(id);
        }

        public void TUpdate(WorkProcess entity)
        {
           _workProcessDal.Update(entity);
        }
    }
}
