错误
7
找不到类型或命名空间名称“PracticeMyBookShopBLL”(是否缺少 using 指令或程序集引用?)
d:\qywz\xwdt.aspx.cs
14
7
d:\qywz\
错误
8
找不到类型或命名空间名称“PracticeMyBookShopModels”(是否缺少 using 指令或程序集引用?)
d:\qywz\xwdt.aspx.cs
15
7
d:\qywz\
程序代码:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
//using System.Xml.Linq;
using System.Data.OleDb;
using PracticeMyBookShopBLL;
using PracticeMyBookShopModels;
public partial class xwdt : System.Web.UI.Page
{
OleDbConnection cn = new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["SQLConnString"].ToString());
int shuliang;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bb();
aa();
Label1.Text = shuliang.ToString();
ViewState["Page"] = 0;
}
Databind();
}
public void bb()
{
OleDbDataAdapter da = new OleDbDataAdapter("select title,fbsj from hangye ", cn);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSourceID = null;
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
public int aa()
{
string str = "select count(id) as ID from hangye";
cn.Open();
OleDbCommand com = new OleDbCommand(str, cn);
int set = com.ExecuteNonQuery();
cn.Close();
return set;
}
private void Databind()
{
PagedDataSource pdsList = new PagedDataSource();
pdsList.DataSource = BookManager.GetHotBooks();
pdsList.AllowPaging = true;
pdsList.PageSize = 5;
pdsList.CurrentPageIndex = Pager;
lblCurrentPage.Text = "第 " + (pdsList.CurrentPageIndex + 1).ToString() + " 页 共 " + pdsList.PageCount.ToString() + " 页";
SetEnablE(pdsList);
dlBooks.DataSource = pdsList;
dlBooks.DataBind();
}
private void SetEnable(PagedDataSource pds)
{
lnkbtnPre.Enabled = true;
lnkbtnNext.Enabled = true;
if (pds.IsFirstPage)
{
lnkbtnPre.Enabled = false;
}
if (pds.IsLastPage)
lnkbtnNext.Enabled = false;
}
private int Pager
{
get{ return (int)ViewState["Page"]; }
set { ViewState["Page"] = value; }
}
protected void lnkBtnPre_Click(object sender, EventArgs e)
{
Pager--;
Databind();
}
protected void lnkbtnNext_Click(object sender, EventArgs e)
{
Pager++;
Databind();
}
}
这2句语句怎么会出现这个情况。,这里的Using指令集不是已经指定了吗?