public override void AddUser(DIUser user) { if (user.Division == null) { user.Division = "Unassigned"; } if (SubUnits.All(x => x.UnitId != user.Division)) { SubUnits.Add(new DIDivision(user.Division)); } SubUnits.First(x => x.UnitId == user.Division).AddUser(user); if (user.Position == DIPosition.HouseGeneral) { _houseGeneralId = user.Id; } else if (user.Position == DIPosition.FirstCommander) { _firstCommanderId = user.Id; } else if (user.Position == DIPosition.HouseAide) { _houseAideId = user.Id; } }
public override void AddUser(DIUser user) { if (user.House == null) { user.House = "Unassigned"; } if (SubUnits.All(x => x.UnitId != user.House)) { SubUnits.Add(new DIHouse(user.House)); } SubUnits.First(x => x.UnitId == user.House).AddUser(user); }
public override void AddUser(DIUser user) { if (user.Roster == null) { user.Roster = "Unassigned"; } if (SubUnits.All(x => x.UnitId != user.Roster)) { SubUnits.Add(new DIRoster(user.Roster)); } SubUnits.First(x => x.UnitId == user.Roster).AddUser(user); if (user.Position == DIPosition.TeamLeader) { _teamLeaderId = user.Id; } else if (user.Position == DIPosition.SecondInCommand) { _secondInCommandId = user.Id; } }
public override void AddUser(DIUser user) { if (user.Team == null) { user.Team = "Unassigned"; } if (SubUnits.All(x => x.UnitId != user.Team)) { SubUnits.Add(new DITeam(user.Team)); } SubUnits.First(x => x.UnitId == user.Team).AddUser(user); if (user.Position == DIPosition.DivisionCommander) { _divisionCommanderId = user.Id; } else if (user.Position == DIPosition.DivisionVice) { _divisionViceId = user.Id; } }