public ActionResult ChangeInfoAccount(int?id)
 {
     TempData["Error"] = "";
     if (CommonFunc.IsNotLogin(Session["UserLogin"] + ""))
     {
         return(RedirectToAction("Login"));
     }
     ViewBag.ListDepartment = department.GetAll(0, "1");
     return(View(user.GetAll(Session["IDLogin"] + "").FirstOrDefault()));
 }
Ejemplo n.º 2
0
        public override void Saved(Sungero.Domain.SavedEventArgs e)
        {
            var managers = Departments.GetAll()
                           .Where(d => d.BusinessUnit.Equals(_obj) && d.HeadOffice == null)
                           .Select(d => d.Manager)
                           .Where(m => m != null)
                           .ToList();

            if (!managers.Any())
            {
                return;
            }

            if (_obj.State.Properties.CEO.IsChanged &&
                _obj.State.Properties.CEO.OriginalValue != null)
            {
                Functions.Module.DeleteSystemSubstitutions(managers, _obj.State.Properties.CEO.OriginalValue);
            }

            if (_obj.CEO != null)
            {
                if (_obj.State.Properties.CEO.IsChanged ||
                    (_obj.State.Properties.Status.IsChanged &&
                     _obj.Status == Sungero.CoreEntities.DatabookEntry.Status.Active))
                {
                    Functions.Module.CreateSystemSubstitutions(managers, _obj.CEO);
                }

                if (_obj.State.Properties.Status.IsChanged &&
                    _obj.Status == Sungero.CoreEntities.DatabookEntry.Status.Closed)
                {
                    Functions.Module.DeleteSystemSubstitutions(managers, _obj.CEO);
                }
            }
        }
Ejemplo n.º 3
0
        public List <ComboBoxModel> Department(int?id_fac = 0)
        {
            var dep  = Departments.GetAll();
            var tree = Dep_Tree.GetAll();
            List <ComboBoxModel> res = new List <ComboBoxModel>();
            //if (id_fac != 0)
            // {
            var query  = tree.FirstOrDefault(w => w.id_department == id_fac);
            var query1 = tree.Where(w => w.id_departmentParent == query.id_departmentTree).ToList();

            for (int i = 0; i < query1.Count; i++)
            {
                var temp = dep.FirstOrDefault(f => f.id_department == query1[i].id_department);
                res.Add(new ComboBoxModel {
                    id = temp.id_department, Name = temp.Name
                });
            }

            // }
            //else if (id_dep != 0)
            //{
            //    var query = tree.FirstOrDefault(w => w.id_department == id_dep);
            //    var query1 = tree.Where(s => s.id_departmentParent == query.id_departmentParent).ToList();
            //    for (int i = 0; i < query1.Count; i++)
            //    {
            //        var temp = dep.FirstOrDefault(f => f.id_department == query1[i].id_department);
            //        res.Add(new ComboBoxModel { id = temp.id_department, Name = temp.Name });
            //    }

            //}
            return(res);
        }
 public ActionResult Index()
 {
     if (CommonFunc.IsNotLogin(Session["UserLogin"] + ""))
     {
         return(RedirectToAction("Login", "Accounts"));
     }
     ViewBag.ListDepartment = dep.GetAll();
     ViewBag.ListUser       = user.GetAll();
     return(View(rp.GetAll()));
 }
Ejemplo n.º 5
0
        public static IQueryable <IDepartment> GetVisibleDepartments()
        {
            var allDepartments = Departments.GetAll();

            if (Functions.Module.IsRecipientRestrict())
            {
                return(RestrictDepartments(allDepartments));
            }

            return(allDepartments);
        }
Ejemplo n.º 6
0
        public override void Deleting(Sungero.Domain.DeletingEventArgs e)
        {
            var managers = Departments.GetAll()
                           .Where(d => d.BusinessUnit.Equals(_obj) && d.HeadOffice == null)
                           .Select(d => d.Manager)
                           .Where(m => m != null)
                           .ToList();

            // Удаление замещений руководителя.
            if (_obj.CEO != null)
            {
                Sungero.Company.Functions.Module.DeleteSystemSubstitutions(managers, _obj.CEO);
            }
        }
Ejemplo n.º 7
0
        public virtual List <int> GetSubordinateDepartmentIds()
        {
            var result = new List <int>();
            var subordinateDepartments = Departments.GetAll(x => !Equals(x, _obj) && Equals(x.HeadOffice, _obj)).ToList();

            result.AddRange(subordinateDepartments.Select(x => x.Id));

            foreach (var department in subordinateDepartments)
            {
                // Вызов через Functions позволяет передать аргументом подразделение, для которого должна быть выполнена функция.
                result.AddRange(Functions.Department.GetSubordinateDepartmentIds(department));
            }

            return(result);
        }
Ejemplo n.º 8
0
        public List <ComboBoxModel> Unis()
        {
            var dep  = Departments.GetAll();
            var tree = Dep_Tree.GetAll();
            List <ComboBoxModel> res = new List <ComboBoxModel>();

            var query = tree.Where(w => w.id_departmentTree == w.id_departmentParent).ToList();

            for (int i = 0; i < query.Count; i++)
            {
                var temp = dep.FirstOrDefault(f => f.id_department == query[i].id_department);
                res.Add(new ComboBoxModel {
                    id = temp.id_department, Name = temp.Name
                });
            }
            return(res);
        }
        public static IBusinessUnit GetBusinessUnit(IEmployee employee)
        {
            if (employee == null)
            {
                return(null);
            }

            var organizations = Departments.GetAll(d => d.Status == Status.Active && d.RecipientLinks.Any(l => Equals(l.Member, employee)))
                                .Where(department => department.BusinessUnit != null)
                                .Select(department => department.BusinessUnit)
                                .Distinct()
                                .ToList();

            if (organizations.Count == 1)
            {
                return(organizations.First());
            }
            return(null);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Зачистить системные замещения.
        /// </summary>
        /// <param name="systemSubstitutionsForDelete">Удаляемые замещения.</param>
        private void ClearSystemSubstitutions(List <Structures.Module.Substitution> systemSubstitutionsForDelete)
        {
            if (_obj.Manager != null)
            {
                // Удаление замещений руководитель - состав подразделения.
                if (_obj.RecipientLinks.Any())
                {
                    var members = _obj.RecipientLinks.Select(r => r.Member).ToList().Select(m => Users.As(m)).Where(m => m != null).ToList();

                    this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                             _obj.Manager,
                                                             members);
                }

                // Удаление замещений на руководителей дочерних подразделений.
                var childDepartmentManagers = Departments.GetAll().Where(d => d.HeadOffice.Equals(_obj)).Select(d => d.Manager)
                                              .Where(m => m != null).ToList();

                if (childDepartmentManagers.Any())
                {
                    this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                             _obj.Manager,
                                                             childDepartmentManagers);
                }

                // Удаление замещения руководителя головной организации.
                if (_obj.HeadOffice != null && _obj.HeadOffice.Manager != null)
                {
                    this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                             _obj.HeadOffice.Manager,
                                                             new[] { _obj.Manager });
                }

                // Удаление замещения руководителя НОР.
                if (_obj.HeadOffice == null && _obj.BusinessUnit != null && _obj.BusinessUnit.CEO != null)
                {
                    this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                             _obj.BusinessUnit.CEO,
                                                             new[] { _obj.Manager });
                }
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Синхронизировать руководителя в роль "Руководители подразделений".
        /// </summary>
        public virtual void SynchronizeManagerInRole()
        {
            var originalManager = _obj.State.Properties.Manager.OriginalValue;
            var manager         = _obj.Manager;

            // Добавить руководителя в роль "Руководители подразделений".
            var managerRole = Roles.GetAll(r => r.Sid == Constants.Module.DepartmentManagersRole).SingleOrDefault();

            if (managerRole == null || (manager != null && manager.IncludedIn(managerRole) && originalManager != null &&
                                        Equals(originalManager, manager) && _obj.State.Properties.Status.OriginalValue == _obj.Status))
            {
                return;
            }

            var ceoRole = Functions.Module.GetCEORole();
            var managerRoleRecipients = managerRole.RecipientLinks;

            if (_obj.Status != CoreEntities.DatabookEntry.Status.Closed && manager != null && !manager.IncludedIn(managerRole) &&
                !manager.IncludedIn(ceoRole))
            {
                managerRoleRecipients.AddNew().Member = manager;
            }

            // Удалить руководителя из роли "Руководители подразделений"
            // при смене или закрытии, если он не руководитель других действующих организаций.
            if (originalManager != null &&
                (_obj.Status == CoreEntities.DatabookEntry.Status.Closed ||
                 originalManager.IncludedIn(ceoRole) ||
                 (!Equals(originalManager, manager) &&
                  !Departments.GetAll(c => c.Status == CoreEntities.DatabookEntry.Status.Active &&
                                      Equals(originalManager, c.Manager) &&
                                      c.Id != _obj.Id).Any())))
            {
                while (managerRoleRecipients.Any(r => Equals(r.Member, originalManager)))
                {
                    managerRoleRecipients.Remove(managerRoleRecipients.First(r => Equals(r.Member, originalManager)));
                }
            }
        }
Ejemplo n.º 12
0
        private void FindDep(int id_person, List <ph_assignments> assign, out string Department, out string Faculty, out string University)
        {
            var Tree   = Dep_Tree.GetAll();
            var Dep    = Departments.GetAll();
            var id_dep = assign.Where(w => w.id_person == id_person).Select(s => s.id_department).ToList();

            if (id_dep.Count > 0)
            {
                if (id_dep[0] == null || id_dep[0].Value == 161 || id_dep[0].Value == 162)
                {
                    Department = null;
                    Faculty    = null;
                    University = null;
                    return;
                }
            }
            else
            {
                Department = null;
                Faculty    = null;
                University = null;
                return;
            }
            Department = Dep.Where(w => w.id_department == id_dep.FirstOrDefault()).Select(s => s.Name).ToString();
            var dep_parent = Tree.Where(w => w.id_department == id_dep.FirstOrDefault()).Select(s => s.id_departmentParent).ToList();
            var id_faculty = Tree.Where(w => w.id_departmentParent == dep_parent.First()).Select(s => s.id_department).ToList();

            Faculty = Dep.Where(w => w.id_department == id_faculty.FirstOrDefault()).Select(s => s.Name).ToString();
            var fac_parent =
                Tree.Where(w => w.id_department == id_faculty.FirstOrDefault())
                .Select(s => s.id_departmentParent)
                .ToList();
            var id_uni =
                Tree.Where(w => w.id_departmentParent == fac_parent.FirstOrDefault())
                .Select(s => s.id_department)
                .ToList();

            University = Dep.Where(w => w.id_department == id_uni.FirstOrDefault()).Select(s => s.Name).ToString();
        }
        public List <IDepartment> GetAllDepartments()
        {
            var departmentsIn = Departments.GetAll()
                                .Where(x => Equals(x.BusinessUnit, _obj))
                                .ToList();

            var departmentsWoBusinessUnitButWithHeadOffice = Departments.GetAll()
                                                             .Where(x => x.BusinessUnit == null && x.HeadOffice != null)
                                                             .ToList();

            var departmentsHeadOfficeInBusinessUnit = new List <IDepartment>();

            do
            {
                departmentsHeadOfficeInBusinessUnit = departmentsWoBusinessUnitButWithHeadOffice.Where(x => departmentsIn.Any(y => Equals(y, x.HeadOffice))).ToList();
                departmentsIn.AddRange(departmentsHeadOfficeInBusinessUnit);
                foreach (var d in departmentsHeadOfficeInBusinessUnit)
                {
                    departmentsWoBusinessUnitButWithHeadOffice.Remove(d);
                }
            } while (departmentsHeadOfficeInBusinessUnit.Count > 0);

            return(departmentsIn);
        }
 // GET: Departments
 public ActionResult Index()
 {
     return(View(department.GetAll()));
 }
        /// <summary>
        /// Синхронизировать руководителя в роль "Руководители наших организаций".
        /// </summary>
        public virtual void SynchronizeCEOInRole()
        {
            var originalCEO = _obj.State.Properties.CEO.OriginalValue;
            var ceo         = _obj.CEO;

            // Добавить руководителя в роль "Руководители наших организаций".
            var ceoRole = Functions.Module.GetCEORole();

            if (ceoRole == null)
            {
                return;
            }

            if (ceo != null && ceo.IncludedIn(ceoRole) && Equals(originalCEO, ceo) &&
                _obj.State.Properties.Status.OriginalValue == _obj.Status)
            {
                return;
            }

            var ceoRoleRecipients = ceoRole.RecipientLinks;

            if (_obj.Status != CoreEntities.DatabookEntry.Status.Closed && ceo != null && !ceo.IncludedIn(ceoRole))
            {
                ceoRoleRecipients.AddNew().Member = ceo;
            }

            // Удалить руководителя из роли "Руководители наших организаций"
            // при смене или закрытии, если он не руководитель других действующих организаций.
            if (_obj.Status == CoreEntities.DatabookEntry.Status.Closed ||
                (originalCEO != null && !Equals(originalCEO, ceo) &&
                 !BusinessUnits.GetAll(c => c.Status == CoreEntities.DatabookEntry.Status.Active &&
                                       Equals(originalCEO, c.CEO) &&
                                       c.Id != _obj.Id).Any()))
            {
                while (ceoRoleRecipients.Any(r => Equals(r.Member, originalCEO)))
                {
                    ceoRoleRecipients.Remove(ceoRoleRecipients.First(r => Equals(r.Member, originalCEO)));
                }
            }

            // Исключить из роли "Руководители подразделений" нового руководителя НОР, либо
            // включить в роль "Руководители подразделений" при смене или закрытии, если он остался руководителем подразделения.
            var managerRole = Roles.GetAll(r => r.Sid == Constants.Module.DepartmentManagersRole).SingleOrDefault();

            if (managerRole != null)
            {
                var managerRoleRecipients = managerRole.RecipientLinks;
                // Исключить из роли "Руководители подразделений".
                if (_obj.Status != CoreEntities.DatabookEntry.Status.Closed && ceo != null && ceo.IncludedIn(managerRole))
                {
                    while (managerRoleRecipients.Any(r => Equals(r.Member, ceo)))
                    {
                        managerRoleRecipients.Remove(managerRoleRecipients.First(r => Equals(r.Member, ceo)));
                    }
                }

                if (originalCEO == null)
                {
                    return;
                }
                if (_obj.Status == CoreEntities.DatabookEntry.Status.Closed ||
                    (Departments.GetAll().Any(d => Equals(d.Manager, originalCEO)) &&
                     !BusinessUnits.GetAll(c => c.Status == CoreEntities.DatabookEntry.Status.Active &&
                                           Equals(originalCEO, c.CEO) &&
                                           c.Id != _obj.Id).Any()))
                {
                    // Включить в роль руководителя подразделений.
                    managerRoleRecipients.AddNew().Member = originalCEO;
                }
            }
        }
Ejemplo n.º 16
0
 public static IQueryable <IDepartment> GetDepartments()
 {
     return(Departments.GetAll());
 }
Ejemplo n.º 17
0
        public virtual List <Structures.ResponsibilitiesReport.ResponsibilitiesReportTableLine> GetResponsibilitiesReportData(IEmployee employee)
        {
            var result = new List <Structures.ResponsibilitiesReport.ResponsibilitiesReportTableLine>();
            // HACK: Получаем отображаемое имя модуля.
            var moduleGuid     = new CompanyModule().Id;
            var moduleName     = Sungero.Metadata.Services.MetadataSearcher.FindModuleMetadata(moduleGuid).GetDisplayName();
            var modulePriority = Company.Constants.ResponsibilitiesReport.CompanyPriority;

            // Должность.
            result = AppendResponsibilitiesReportResult(result, employee.JobTitle, moduleName, modulePriority, Resources.Jobtitle);

            // Подразделения.
            if (Departments.AccessRights.CanRead())
            {
                var employeeDepartments = Departments.GetAll()
                                          .Where(d => d.RecipientLinks.Any(e => Equals(e.Member, employee)))
                                          .Where(d => d.Status == Sungero.CoreEntities.DatabookEntry.Status.Active);
                result = AppendResponsibilitiesReportResult(result, employeeDepartments, moduleName, modulePriority, Resources.Departments, employee.Department);
            }

            // НОР.
            if (Departments.AccessRights.CanRead() &&
                BusinessUnits.AccessRights.CanRead())
            {
                var businessUnits = Departments.GetAll()
                                    .Where(d => d.RecipientLinks.Any(e => Equals(e.Member, employee)))
                                    .Where(d => d.Status == Sungero.CoreEntities.DatabookEntry.Status.Active)
                                    .Select(b => b.BusinessUnit)
                                    .Where(b => b.Status == Sungero.CoreEntities.DatabookEntry.Status.Active).Distinct();
                result = AppendResponsibilitiesReportResult(result, businessUnits, moduleName, modulePriority, Resources.BusinessUnits, employee.Department.BusinessUnit);
            }

            // Руководитель подразделений.
            if (Departments.AccessRights.CanRead())
            {
                var managerOfDepartments = Departments.GetAll().Where(d => Equals(d.Manager, employee))
                                           .Where(d => d.Status == Sungero.CoreEntities.DatabookEntry.Status.Active);
                result = AppendResponsibilitiesReportResult(result, managerOfDepartments, moduleName, modulePriority, Resources.ManagerOfDepartmens);
            }

            // Руководители НОР.
            if (BusinessUnits.AccessRights.CanRead())
            {
                var businessUnitsCEO = BusinessUnits.GetAll().Where(b => Equals(b.CEO, employee))
                                       .Where(d => d.Status == Sungero.CoreEntities.DatabookEntry.Status.Active);
                result = AppendResponsibilitiesReportResult(result, businessUnitsCEO, moduleName, modulePriority, Resources.BusinessUnitsCEO);
            }

            // Роли.
            if (Roles.AccessRights.CanRead())
            {
                var roles = Roles.GetAll().Where(r => r.RecipientLinks.Any(e => Equals(e.Member, employee)))
                            .Where(d => d.Status == Sungero.CoreEntities.DatabookEntry.Status.Active);
                result = AppendResponsibilitiesReportResult(result, roles, moduleName, modulePriority, Resources.Roles);
            }

            // Помощники руководителей.
            if (ManagersAssistants.AccessRights.CanRead())
            {
                var managersAssistants = ManagersAssistants.GetAll()
                                         .Where(m => Equals(m.Assistant, employee) || Equals(m.Manager, employee))
                                         .Where(d => d.Status == Sungero.CoreEntities.DatabookEntry.Status.Active)
                                         .ToDictionary <IEntity, IEntity, string>(x => x,
                                                                                  x => string.Format("{0}: {1}{2}{3}: {4}",
                                                                                                     Resources.Manager,
                                                                                                     PublicFunctions.Employee.GetShortName(ManagersAssistants.As(x).Manager, false),
                                                                                                     Environment.NewLine,
                                                                                                     Resources.Assistant,
                                                                                                     PublicFunctions.Employee.GetShortName(ManagersAssistants.As(x).Assistant, false)));
                result = AppendResponsibilitiesReportResult(result, managersAssistants, moduleName, modulePriority + result.Count, Resources.ManagersAssistants);
            }

            // Замещения.
            if (Substitutions.AccessRights.CanRead())
            {
                var substitutions = Substitutions.GetAll()
                                    .Where(s => (Equals(s.Substitute, employee) ||
                                                 Equals(s.User, employee)) &&
                                           (!s.EndDate.HasValue || s.EndDate >= Calendar.UserToday))
                                    .Where(s => s.IsSystem != true)
                                    .ToDictionary <IEntity, IEntity, string>(x => x, x => CreateSubstitutionPresentation(Substitutions.As(x)));
                result = AppendResponsibilitiesReportResult(result, substitutions, moduleName, modulePriority + result.Count, Resources.Substitutions);
            }

            return(result);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Отработка изменения системных замещений при изменении руководителя подразделения.
        /// </summary>
        /// <param name="systemSubstitutionsForCreate">Создаваемые замещения.</param>
        /// <param name="systemSubstitutionsForDelete">Удаляемые замещения.</param>
        private void UpdateSystemSubstitutionForChangedManager(List <Structures.Module.Substitution> systemSubstitutionsForCreate,
                                                               List <Structures.Module.Substitution> systemSubstitutionsForDelete)
        {
            if (_obj.State.Properties.Manager.IsChanged)
            {
                if (_obj.RecipientLinks.Any())
                {
                    var members = _obj.RecipientLinks.Select(r => r.Member).ToList().Select(m => Users.As(m)).Where(m => m != null).ToList();

                    // Удаление замещений существующего руководителя.
                    if (_obj.State.Properties.Manager.OriginalValue != null)
                    {
                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                 _obj.State.Properties.Manager.OriginalValue,
                                                                 members);
                    }

                    // Создание замещений для нового руководителя.
                    if (_obj.Manager != null)
                    {
                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForCreate,
                                                                 _obj.Manager,
                                                                 members);
                    }
                }

                if (_obj.Manager != null)
                {
                    // Создание/удаление замещений на руководителей дочерних подразделений.
                    var childDepartmentManagers = Departments.GetAll().Where(d => d.HeadOffice.Equals(_obj))
                                                  .Select(d => d.Manager).Where(m => m != null).ToList();

                    if (childDepartmentManagers.Any())
                    {
                        if (_obj.State.Properties.Manager.OriginalValue != null)
                        {
                            this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                     _obj.State.Properties.Manager.OriginalValue,
                                                                     childDepartmentManagers);
                        }

                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForCreate,
                                                                 _obj.Manager,
                                                                 childDepartmentManagers);
                    }

                    // Создание/удаление замещения руководителя головного подразделения.
                    if (_obj.HeadOffice != null && _obj.HeadOffice.Manager != null)
                    {
                        if (_obj.State.Properties.Manager.OriginalValue != null)
                        {
                            this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                     _obj.HeadOffice.Manager,
                                                                     new[] { _obj.State.Properties.Manager.OriginalValue });
                        }

                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForCreate,
                                                                 _obj.HeadOffice.Manager,
                                                                 new[] { _obj.Manager });
                    }

                    // Создание/удаление замещения руководителя НОР.
                    if (_obj.BusinessUnit != null && _obj.BusinessUnit.CEO != null)
                    {
                        if (_obj.State.Properties.Manager.OriginalValue != null)
                        {
                            this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                     _obj.BusinessUnit.CEO,
                                                                     new[] { _obj.State.Properties.Manager.OriginalValue });
                        }

                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForCreate,
                                                                 _obj.BusinessUnit.CEO,
                                                                 new[] { _obj.Manager });
                    }
                }

                // Удаление замещений руководителей.
                if (_obj.Manager == null && _obj.State.Properties.Manager.OriginalValue != null)
                {
                    // Удаление замещений на руководителей дочерних подразделений.
                    var childDepartmentManagers = Departments.GetAll().Where(d => d.HeadOffice.Equals(_obj))
                                                  .Select(d => d.Manager).Where(m => m != null).ToList();

                    if (childDepartmentManagers.Any())
                    {
                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                 _obj.State.Properties.Manager.OriginalValue,
                                                                 childDepartmentManagers);
                    }

                    // Удаление замещения руководителя головного подразделения.
                    if (_obj.HeadOffice != null && _obj.HeadOffice.Manager != null)
                    {
                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                 _obj.HeadOffice.Manager,
                                                                 new[] { _obj.State.Properties.Manager.OriginalValue });
                    }

                    // Удаление замещения руководителя НОР.
                    if (_obj.HeadOffice == null && _obj.BusinessUnit != null && _obj.BusinessUnit.CEO != null)
                    {
                        this.UpdateSystemSubstitutionsCollection(systemSubstitutionsForDelete,
                                                                 _obj.BusinessUnit.CEO,
                                                                 new[] { _obj.State.Properties.Manager.OriginalValue });
                    }
                }
            }
        }