SPWeb web = SPControl.GetContextWeb(Context);
SPUser sUser = web.CurrentUser;
string str = "Name:" + sUser.Name + "
"; "Login Name :" + sUser.LoginName + "
"; "Email:" + sUser.Email + "
"; "Groups:" + sUser.Groups.Count + "
";
foreach (SPGroup grp in sUser.Groups) { " * " + grp.Name + " total Members:" + grp.Users.Count + "
"; catch (Exception ex) { "No Current User" ;
Getting the Current User Name or ID in SharePoint using SharePoint Designer (no code):
http://blogs.msdn.com/joshuag/archive/2008/06/03/getting-the-current-user-name-or-id-in-sharepoint-using-sharepoint-designer-no-code.aspx
Sunday, May 24, 2009
Monday, May 18, 2009
New User Request WF
--- On Wed, 13/5/09, ravi kumar <raviurpal@yahoo.com> wrote:
|
Tuesday, May 5, 2009
Updating in Tbl1 col based on cols from Tbl2 and Tbl3
scenario:This query updates the ModuleId,SubModuleID columns in tbl1 based on PQR column by using the values from the two different tables tbl2 and tbl3 i.e. tbl2.ModuleId and tbl3.SubModuleId if PQR column has in the foramt of ModuleName\SubModuleName.
select (select ModuleID from appmodules where Modulename =
substring(permissionssection,0,charindex('\',permissionssection))) as MainModuleID,(select Max(SubModuleID) from appsubmodules where (SubModulename = substring (permissionssection
,charindex('\',permissionssection)+1,len(permissionssection))) or (Replace(SubModulename,' ','') = substring (permissionssection
,charindex('\',permissionssection)+1,len(permissionssection))) ) as SubModuleID,substring(permissionssection,0,charindex('\',permissionssection)) as start,substring (permissionssection ,charindex('\',permissionssection)+1,len(permissionssection)) as endID from securable.
select (select ModuleID from appmodules where Modulename =
substring(permissionssection,0,charindex('\',permissionssection))) as MainModuleID,(select Max(SubModuleID) from appsubmodules where (SubModulename = substring (permissionssection
,charindex('\',permissionssection)+1,len(permissionssection))) or (Replace(SubModulename,' ','') = substring (permissionssection
,charindex('\',permissionssection)+1,len(permissionssection))) ) as SubModuleID,substring(permissionssection,0,charindex('\',permissionssection)) as start,substring (permissionssection ,charindex('\',permissionssection)+1,len(permissionssection)) as endID from securable.
Subscribe to:
Posts (Atom)