Esempio n. 1
0
 public void RemoveAuth(TimeAxisAuthority e)
 {
     if (TimeAxisAuthorities == null)
     {
         TimeAxisAuthorities = new List <TimeAxisAuthority>();
     }
     TimeAxisAuthorities.Remove(e);
 }
Esempio n. 2
0
 public void AddAuth(TimeAxisAuthority e)
 {
     if (TimeAxisAuthorities == null)
     {
         TimeAxisAuthorities = new List <TimeAxisAuthority>();
     }
     TimeAxisAuthorities.Add(e);
 }
Esempio n. 3
0
        public TimeAxis AssignTo(User user, TimeAxis line, TimeAxisAuthority auth)
        {
            if (user == null || line == null || auth == null)
            {
                throw new ArgumentNullException();
            }

            if (HasAuthority(user, line, auth.AuthorityType))
            {
                return(line);
            }

            line.AddAuth(auth);
            user.AddAuth(auth);

            return(line);
        }
Esempio n. 4
0
        public TimeAxis AssignTo(User user, TimeAxis line, AuthorityType type)
        {
            var auth = new TimeAxisAuthority(user, type);

            return(AssignTo(user, line, auth));
        }