public void RemoveComponentManager(ManagerBySelf component) { if (Managers != null && Managers.Any() && component != null) { Managers.Remove(component); } }
public void RemoveManager(Manager manager) { if (Managers != null && Managers.Any() && manager != null) { Managers.Remove(manager); } }
private bool IsOwnerOrManager(Guid userGuid) { var isOwner = Owners.Any(owner => owner.OwnerGuid.Equals(userGuid)); var isManager = Managers.Any(manager => manager.OwnerGuid.Equals(userGuid)); return(isOwner || isManager); }
public bool ManagerExists(Func <Manager, bool> predicate) { var exists = Managers.Any(predicate); if (!exists) { exists = Managers.Local.Any(predicate); } return(exists); }
protected EntityManagerBase SelectManager(IStatementRunner runner) { if (Managers?.Any(p => p.Key(runner)) ?? false) { return(Managers.First(p => p.Key(runner)).Value); } else { return(Default); } }
/// <summary> /// 检查下属工作 /// </summary> public void CheckWork() { DoWork(); if (Employees != null && Employees.Any()) { Employees.ForEach(t => { t.DoWork(); }); } if (Managers != null && Managers.Any()) { Managers.ForEach(t => { t.CheckWork(); }); } }
public bool ContainEmployee(string name, Position position) { if (position == Position.Manager) { var contain = Managers.Any(e => e.Name == name); return(contain); } if (position == Position.Taskmaster) { var contain = Taskmasters.Any(e => e.Name == name); return(contain); } if (position == Position.Worker) { var contain = Workers.Any(e => e.Name == name); return(contain); } return(false); }
private bool IsCreatorOrOwnerOrManager(Guid userGuid) { var isManager = Managers.Any(m => m.OwnerGuid.Equals(userGuid)); return(IsCreatorOrOwner(userGuid) || isManager); }
public bool IsManager(Guid userGuid) { return(Managers.Any(manager => manager.OwnerGuid.Equals(userGuid))); }