public void DeleteTransactionUser() { if (SelectedTransactionUser != null) { OtherUsers.Add(SelectedTransactionUser.User); db.TransactionUsers.Remove(SelectedTransactionUser); TransactionUsersCollection.Remove(SelectedTransactionUser); SelectedUser = OtherUsers.FirstOrDefault(); } }
private void UpdateOtherUsers(int discussionId, int ownId) { OtherUsers.Clear(); var q = from p in PrivateCenterCtx.Get().Person where p.Topic.Any(t0 => t0.Discussion.Id == discussionId) && !p.Name.StartsWith(DaoUtils.MODER_SUBNAME) && p.Id != ownId select p; foreach (var p in q) { OtherUsers.Add(new PersonExt(p)); } if (OtherUsers.Count > 0) { _otherUserSelectedManually = false; lstOtherUsers.SelectedIndex = 0; _otherUserSelectedManually = true; UpdateOtherUsersDots(PrivateCenterCtx.Get()); } }