示例#1
0
        public void ActivateOrDeactivateById(long id, bool active)
        {
            Project project = _projectRepository.ActivateOrDeactivateById(id, active);

            if (active)
            {
                _customerRepository.ActivateOrDeactivateById(project.CustomerId, true);
                project.Plannings = _planningRepository.ReadAllByProjectId(project.Id).ToList();
                foreach (var planning in project.Plannings)
                {
                    _jobRoleRepository.ActivateOrDeactivateById(planning.JobRoleId, true);
                }
            }
        }
示例#2
0
 public void ActivateOrDeactivateById(long id, bool active)
 {
     _jobRoleRepository.ActivateOrDeactivateById(id, active);
 }