Now I have another class called BulkHistoryPaging.cs. Here is the code in that class.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Web;
/// <summary>
/// Summary description for BulkHistoryPaging
/// </summary>
public class BulkHistoryPaging
{
public static IEnumerable<BulkHistoryPaging> GetBulkHistory(int startRowIndex, int maximumRows)
{
BulkViewHistoryDataContext db = new BulkViewHistoryDataContext();
return db.tblBulk.skip(startRowIndex).Take(maximumRows);
}
public static int GetBulkHistoryCount()
{
HttpContext context = HttpContext.Current;
if (context.Cache["BulkHistoryCount"] == null)
{
context.Cache["BulkHistoryCount"] = GetBulkHistoryCountFromDB();
}
return (int)context.Cache["BulkHistoryCount"];
}
private static int GetBulkHistoryCountFromDB()
{
BulkViewHistoryDataContext db = new BulkViewHistoryDataContext();
return db.tblBulk.count();
}
}
What it keeps erroring out on is the BulkViewHistoryDataContext. I receive an error message that says "The type or namespace name 'BulkViewHistoryDataContext' could not be found (are you missing a using directive or an assembly directive?).
The code for the Data Source object that is referencing this is:
<asp:ObjectDataSource
ID="srcBulkHistoryPaging"
TypeName="BulkHistoryPaging"
SelectMethod="GetBulkHistory"
SelectCountMethod="GetBulkHistoryCount"
EnablePaging="true"
runat="server" />
I know I am missing something small. But I just can't seem to figure it out. Thank you for your time!
D. Elizabeth Bulyar

New Topic/Question
Reply




MultiQuote


|