在我编程中,我遇到了一个这样的报错,
可是我引用的product类中又确实定义了这么一个方法,
protected void BindPageData(int categoryID)
{
Product product = new Product();
DataTable dt = product.GetProductByFenlei(categoryID);
if (dt == null || dt.Rows.Count <= 0) return;
// 设置按销量排序
DataView dv = dt.DefaultView;
dv.Sort = "SaleNumber DESC";
gvProduct.DataSource = dv;
gvProduct.DataBind();
}
类中的方法代码
public class Product
{
public Product()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
DBhelp db = new DBhelp();