我收到以下错误:
Inconsistent accessibility: parameter type 'RR.DAL.LINQSqlCLient.StaticReport' is less accessible than method 'RR.BLL.AuditTrail.InsertStaticReportAudit(RR.DAL.LINQSqlCLient.StaticReport, string)'
D:\My Projects\ASP Projects\Development\RapidReportTool\Working Directory\App_Code\BLL\AuditTrail.cs
这是我的代码:
public static void InsertStaticReportAudit(StaticReport staticReport, string filterString)
{
if (System.Web.HttpContext.Current.Session["AuditTrail"] != null)
{
AuditTrail CurrAuditTrail = (AuditTrail)System.Web.HttpContext.Current.Session["AuditTrail"];
AuditTrailReports auditTrailReport = new AuditTrailReports();
auditTrailReport.ID = AuditTrailReports.Insert(CurrAuditTrail.ID, staticReport.ID, filterString, DateTime.Now, true);
System.Web.HttpContext.Current.Session["AuditTrailReport"] = auditTrailReport;
}
}
参数StaticReport类:
partial class StaticReport
{
public bool BelongsToReportCategory(int reportCategoryID)
{
//If there is an entry StaticReport_ReportCategories junction table,
//then this static report belongs to the report category
RapidReportDataContext db = new RapidReportDataContext();
var query = from sr_sc in db.StaticReport_ReportCategories
where sr_sc.StaticReportID == this.ID && sr_sc.ReportCategoryID == reportCategoryID
select sr_sc;
if (query.Count() > 0)
return true;
else
return false;
}
}
不知道为什么我会收到这个错误。请帮忙。谢谢你。