[Microsoft.SqlServer.Server.SqlFunction(DataAccess =
DataAccessKind.Read, SystemDataAccess = SystemDataAccessKind.Read)]
[System.Security.Permissions.PrincipalPermission(System.Security.Permissions.SecurityAction.Demand)]
public static SqlString GetPictureUrl(string accountName)
{
try
{
if (accountName == null || accountName == string.Empty)
return SqlString.Null;
else if (System.IO.File.Exists(@"Y:\Hr\OurPeople\WhosWho
\photos\big\" + aname + ".jpg"))
return new SqlString("http://mh000xsiis01/hr/ourpeople/
whoswho/photos/big/" + aname + ".jpg");
else
return SqlString.Null;
}
catch (Exception exc)
{
throw exc;
}
}