public void addSubmeeting(Submeeting submeeting) { Submeetings.Add(submeeting); if (submeeting.Project != this) { submeeting.addProject(this); } }
public void deleteSubmeeting(Submeeting submeeting, User currentrUser) { if (currentrUser.Admin || submeeting.Meeting.Owner == currentrUser)//needs to allow atendee roles { submeetings.Remove(submeeting); } else { throw new InvalidAccessException(); } }
public void AddSubmeeting(Submeeting submeeting, User currUser) { if (submeeting == null) { throw new CantBeNullException(); } else if (currUser != Owner && !currUser.Admin) { throw new InvalidAccessException(); } else { Submeetings.Add(submeeting); } }
public void removeSubmeeting(Submeeting submeeting, User currUser) { if (currUser != submeeting.Meeting.Owner && !currUser.Admin) { throw new InvalidAccessException(); } else if (!Submeetings.Contains(submeeting)) { throw new DoNotContainElementException(); } else { Submeetings.Remove(submeeting); } }
public void RemoveSubmeeting(Submeeting submeeting, User currUser) { if (submeeting == null) { throw new CantBeNullException(); } else if (currUser != Owner && !currUser.Admin) { throw new InvalidAccessException(); } else if (!Submeetings.Contains(submeeting)) { throw new DoNotContainElementException(); } else { if (submeeting.Project != null) { submeeting.Project.removeSubmeeting(submeeting, currUser); } Submeetings.Remove(submeeting); } }
public void removeSubmeeting(Submeeting submeeting) { Submeetings.Remove(submeeting); }
public void addSubmeeting(Submeeting newSubmeeting) { Submeetings.Add(newSubmeeting); }
public void addSubmeeting(Submeeting submeeting) { submeetings.Add(submeeting); }