62,243
社区成员




[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.Read)]
public string GetAgencyLogoURL(int ProjectID)
{
string companyLogo = "../images/logo.gif";
string companyLogoBasePath = ConfigurationManager.AppSettings["ApplicationRoot"].ToString() + "\\Images\\CompanyLogos";
try
{
DataTable dt = ElationSys.Utils.Utils.accessDB("Select A.LogoPath From AgencyLogos A inner join Projects B ON B.AwardingAgencyCompanyID=A.CompanyID Where B.ProjectID=" + ProjectID.ToString() + " and A.ActiveRecord=1", "");
if (dt.Rows.Count > 0)
{
if (dt.Rows[0]["LogoPath"] != null && System.IO.File.Exists(companyLogoBasePath + "\\" + dt.Rows[0]["LogoPath"]))
companyLogo = "../Images/CompanyLogos/" + dt.Rows[0]["LogoPath"];
}
}
catch (Exception ex) {companyLogo = "../images/logo.gif"; }
return companyLogo;
}