///<summary>
///自定义函数,绑定可选课程DataGrid
///</summary>
protected void DG_Alter_Bind()
{
//从Session中获得学号
string UName = Session["UName"].ToString().Trim();
//通过SQL语句,使已选课程不出现在可选课程中
string SelectStr = "Select CName,TName,CInfo from Course,Teacher where"
+ "Course.CName not in(Select CName from Elect where SNo='" +
UName + "')and Course.CTNo=Teacher.TNo";
DB.BindDataGrid(SelectStr,DG_Alter);
}红色这一行的错误是:错误1.与“Elect.DBAccess.BindDataGrid(string, System.Web.UI.WebControls.DataGrid)”最匹配的重载方法具有一些无效参数
错误2.参数“2”: 无法从“System.Web.UI.WebControls.GridView”转换为“System.Web.UI.WebControls.DataGrid”
十分感谢!
///自定义函数,绑定可选课程DataGrid
///</summary>
protected void DG_Alter_Bind()
{
//从Session中获得学号
string UName = Session["UName"].ToString().Trim();
//通过SQL语句,使已选课程不出现在可选课程中
string SelectStr = "Select CName,TName,CInfo from Course,Teacher where"
+ "Course.CName not in(Select CName from Elect where SNo='" +
UName + "')and Course.CTNo=Teacher.TNo";
DB.BindDataGrid(SelectStr,DG_Alter);
}红色这一行的错误是:错误1.与“Elect.DBAccess.BindDataGrid(string, System.Web.UI.WebControls.DataGrid)”最匹配的重载方法具有一些无效参数
错误2.参数“2”: 无法从“System.Web.UI.WebControls.GridView”转换为“System.Web.UI.WebControls.DataGrid”
十分感谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货