예제 #1
0
        public static void SetNewLeader(Guid leaderId, Guid employeeId)
        {
            var employee = AccessBDStaff.Get(employeeId);
            var lead     = AccessBDStaff.Get(leaderId);

            lead.Underlings.Add(employee.Id);
            employee.Leader = leaderId;
            AccessBDStaff.Update(employee);
            AccessBDStaff.Update(lead);
        }
예제 #2
0
        public void AddLeader(Guid leaderId, Guid employee)
        {
            if (GetEmployee(employee).IsTeamLead)
            {
                var newEmployee = GetEmployee(employee);
                newEmployee.IsTeamLead = false;
                AccessBDStaff.Update(newEmployee);
            }

            SetNewLeader(leaderId, employee);
        }