private void NewUsersDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (NewUsersDataGrid.SelectedIndex == -1) return; ShowUserProfile UserProfile = new ShowUserProfile(UserLogined, (NewUsersDataGrid.SelectedItem as Users), forumEntities, DB); UserProfile.Show(); }
private void NewMesTabItem_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (NewMesDataGrid.SelectedIndex == -1) return; Guid selUserID = (NewMesDataGrid.SelectedValue as Post).UserId; Users selUser = (from q in forumEntities.Users where q.UserId == selUserID select q).First(); ShowUserProfile UserProfile = new ShowUserProfile(UserLogined, selUser, forumEntities, DB); UserProfile.Show(); }
private void AuthorPostButton_Click(object sender, RoutedEventArgs e) { if (PostsDataGrid.SelectedIndex == -1) return; Guid selUserID = (PostsDataGrid.SelectedValue as Post).UserId; Users selUser = (from q in forumEntities.Users where q.UserId == selUserID select q).First(); ShowUserProfile UserProfile = new ShowUserProfile(UserLogined, selUser, forumEntities, DB); UserProfile.Show(); }