TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Peter kulandairaj
NA
10
1.2k
How to write 'select * from table where condtion' query
Aug 20 2013 9:23 AM
[ToolboxItemAttribute(false)]
public class AssignedToMeResults : CoreResultsWebPart
{
protected override XPathNavigator GetXPathNavigator(string viewPath)
{
// SPContext.Current.Web.CurrentUser.LoginName => "SHAREPOINT\\system"
// SPContext.Current.Web.CurrentUser.Name => "System Account"
// Read active AD User Name who logged in
string adUserName = Page.User.Identity.Name;
string[] fullName = adUserName.Split('\\');
string domainName = string.Empty;
string userName = string.Empty;
if (fullName.Length == 2)
{
domainName = fullName[0];
userName = fullName[1];
}
// Restrict the actual result and look for the property where user name is not
QueryManager queryManager = SharedQueryManager.GetInstance(this.Page).QueryManager;
queryManager.UserQuery = "FirstName:Peter";
//queryManager.UserQuery = "SELECT FirstName FROM Scope() WHERE \"scope\" = 'All Sites'";\
return base.GetXPathNavigator(viewPath);
}
}
Reply
Answers (
1
)
hello
How to reduce index space of sql table??