the following function will take an User Name as a parameter and will return the section for the user--------------------------------------------------------------
private string GetSectionByUserName(string userName)
{
string section = string.Empty;
SPList userList = SPContext.Current.Web.SiteUserInfoList;
SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='Author'/><Value Type='Text'>"+ userName + "</Value></Eq></Where>";
SPListItemCollection itemCollection = userList.GetItems(query);
if (itemCollection.Count > 0)
{
section = itemCollection[0]["Section"].ToString();
}
return section;
}
Subscribe to:
Posts (Atom)
5 Strategies for Getting More Work Done in Less Time
Summary. You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...

-
Sometimes just to get a quick success build you might need to disable/ignore/skip some of the munit test cases. you can do you by double ...
-
Some times you might need to return static response from nginx. for example validating file upload limit error_page 413 @413_x...
-
Imagine going to work everyday and facing a colleague who does not respect you or having to work with someone who was constantly underminin...