public virtual void UpdateCustomActions(Dictionary <int, bool> actions, PartyId userId, List <ActionType> roleActionTypes) { var newList = new List <PartyCustomAction>(); actions.ToList().ForEach(c => { newList.Add(new PartyCustomAction(userId, c.Key, c.Value)); }); this.customActions = new Dictionary <int, bool>(); newList.ForEach(d => { if (d.IsGranted) { if (!roleActionTypes.Exists(c => (int)c == d.ActionTypeId)) { this.customActions.Add(d.ActionTypeId, d.IsGranted); } } else { if (roleActionTypes.Exists(c => (int)c == d.ActionTypeId)) { this.customActions.Add(d.ActionTypeId, d.IsGranted); } } }); }
public Party(PartyId id) { if (id == null) { throw new ArgumentNullException("id"); } this.id = id; }
public SuperAdminUser(PartyId userId, string fName, string lName, string email) : base(userId, fName, lName, email) { Actions = new List <ActionType>(); foreach (ActionType action in Enum.GetValues(typeof(ActionType))) { Actions.Add(action); } }
public AdminUser(PartyId userId, string fName, string lName, string email) : base(userId, fName, lName, email) { }
public PartyCustomAction(PartyId partyId, int actionTypeId, bool isGranted) { this.PartyId = partyId; this.ActionTypeId = actionTypeId; this.IsGranted = isGranted; }
public EmployeeUser(PartyId userId, string employeeNo, string fname, string lname, string email) : base(userId, fname, lname, email) { this.employeeNo = employeeNo; }
public bool SameValueAs(PartyId other) { return(PartyName.ToLower().Equals(other.partyName.ToLower())); }
public User(PartyId id, string firstname, string lastname, string email, bool isActive) : base(id) { setProperties(firstname, lastname, email, isActive); }
public User(PartyId id, string firstname, string lastname, string email) : base(id) { setProperties(firstname, lastname, email, true); }
public Group(PartyId id, string description) : base(id) { this.description = description; }