private List <BindingItem> GetUserStatus(Article item) { var userStatus = new List <BindingItem>(); IList <Access> accesses = AccessManager.GetItemAccess(item.Category.Id); var users = new List <BusiBlocks.Membership.User>(); foreach (Access access in accesses) { users.AddRange(AccessManager.GetAccessibleItemUsers(access)); } foreach (BusiBlocks.Membership.User user in users) { if (item.RequiresAck) { if (!item.HasUserActioned(user.Name, AuditRecord.AuditAction.Acknowledged)) { if (!userStatus.Exists(delegate(BindingItem bi) { return(bi.Username == user.Name); })) { userStatus.Add(new BindingItem() { Username = user.Name, ViewedOrAcked = false, RequiresAck = item.RequiresAck }); } } else { if (!userStatus.Exists(delegate(BindingItem bi) { return(bi.Username == user.Name); })) { userStatus.Add(new BindingItem() { Username = user.Name, ViewedOrAcked = true, RequiresAck = item.RequiresAck }); } } } else { if (!item.HasUserActioned(user.Name, AuditRecord.AuditAction.Viewed)) { if (!userStatus.Exists(delegate(BindingItem bi) { return(bi.Username == user.Name); })) { userStatus.Add(new BindingItem() { Username = user.Name, ViewedOrAcked = false, RequiresAck = item.RequiresAck }); } } else { if (!userStatus.Exists(delegate(BindingItem bi) { return(bi.Username == user.Name); })) { userStatus.Add(new BindingItem() { Username = user.Name, ViewedOrAcked = true, RequiresAck = item.RequiresAck }); } } } } return(userStatus); }