家教信息管理系统毕业论文设计(ASP.NET)(4)
资料介绍:
new SqlParameter("@teacherInfo",tch.TeacherInfo)
};
int res = sqlhelper.ExecuteNonQuery(cmdText, paras, CommandType.StoredProcedure);
if (res > 0)
{
flag = true;
}
return flag;
}
#endregion
5.2.3搜索功能的代码
#region 按课程搜索教员
/// <summary> [资料来源:http://www.doc163.com]
/// 按课程搜索教员
/// </summary>
/// <returns></returns>
public DataTable SelectCourseTeacher(string txt)
{
DataTable dt = new DataTable();
string cmdText = "teacher_SelectByC";
SqlParameter[] paras = new SqlParameter[]{
new SqlParameter ("@teacherCourse",txt)
};
dt = sqlhelper.ExecuteQuery(cmdText, paras, CommandType.StoredProcedure);
[资料来源:http://doc163.com]
return dt;
}
#endregion
#region 按地点搜索教员
/// <summary>
/// 按地点搜索教员
/// </summary>
/// <returns></returns>
public DataTable SelectAddressTeacher(string txt)
{
DataTable dt = new DataTable();
string cmdText = "teacher_SelectByA";
SqlParameter[] paras = new SqlParameter[]{
[资料来源:http://doc163.com]
new SqlParameter ("@teacherAddress",txt)
};
dt = sqlhelper.ExecuteQuery(cmdText, paras, CommandType.StoredProcedure);
return dt;
}
#endregion
#region 按价格搜索教员
/// <summary>
/// 按价格搜索教员
/// </summary>
/// <returns></returns>
public DataTable SelectPriceTeacher(string txt)
[版权所有:http://DOC163.com]
{
DataTable dt = new DataTable();
string cmdText = "teacher_SelectByP";
SqlParameter[] paras = new SqlParameter[]{
new SqlParameter ("@price",txt)
};
dt = sqlhelper.ExecuteQuery(cmdText, paras, CommandType.StoredProcedure);
return dt;