计算机毕业设计介绍:
4.2.5 查询功能
查询是每个数据库软件必不可少的模块。它能方便数据、信息的查找。该系统中每类用户(除管理员)都存在查询功能。
(1) 教师的查询:教师在征订书籍后,可单击查询表单,进入查询页面,根据课程名、教材名、ISBD号查询自己征订的所有书籍的内容。
(2) 系主任的查询:教师在征订书籍后,系主任可以单击查询表单,进入查询页面,根据课程名、教材名、ISBD号查询该系主任所在系所有征订书籍的情况。
(3) 教学秘书的查询。教师在征订书籍后,系主任通过审核后,教学秘书可以单击查询表单,进入查询页面,根据课程名、教材名、ISBD号查询该教学秘书所在系所有通过审核书籍的情况。
(4) 教材科的查询。在所有征订工作结果后,教材科可以单击查询表单,进入查询页面,根据课程名、教材名、ISBD号查询所有老师征订书籍的结果。也可单击“统计表单”,在该表单中进行模糊查询。
具体代码如下:
private void getListforquery (int pageSize, int CurrentPage)
{
string sql="", sBook, sCourse, sIsbn, sUserName;
sCourse= (string) Session ["QueryCourse"];
sBook= (string) Session ["QueryBook"];
sIsbn= (string) Session ["QueryIsbn"];
sUserName= (string) Session ["QueryUserName"];
if(iUsId>=5000) //教材科 只能查询所有已审核表单
sql+="Select c.user_name as '授课人',a,.ISBN as 'ISBN,号',a.book_name as '教材名',a. publisher as '出版社',a.pub_time as '出版时间',"+
"a.author_name as '作者',b.department_name as '所属院系',d.book_type_name as '教材类型',a.bar_cord as '条形码',a. approve as '审核',a.student_count as '学生数',"+
"a.student_class as '班级',a.approver_ID as '审核人',a.course_name as '课程名' From book_order_table a,department_type b,user_info_table c,book_type_table d where a.book_type=d.book_type and a.user_ID=c.user_ID and a.department=b.department_number "+" and a. approve='已审核'";
else if(iUsId>=4000) //系秘书查询本系审核表单
sql+="Select c.user_name as '授课人',a.ISBN as 'ISBN号',a.book_name as '教材名',a. publisher as '出版社',a.pub_time as '出版时间',"+
"a.author_name as '作者',b.department_name as '所属院系',d.book_type_name as '教材类型',a.bar_cord as '条形码',a. approve as '审核',a.student_count as '学生数',"+
"a.student_class as '班级',a.approver_ID as '审核人ID',a.course_name as '课程名' "+" From book_order_table a,department_type b,user_info_table c,book_type_table d where a. approve='已审核' and a.book_type=d.book_type and a.user_ID=c.user_ID and a.department=b.department_number and c.department=b.department_number ";
else if(iUsId>=3000) //系主任查询本系所有表单
sql+="Select c.user_name as '授课人',a.ISBN as 'ISBN号',a.book_name as '教材名',a. publisher as '出版社',a.pub_time as '出版时间',"+
"a.author_name as '作者',b.department_name as '所属院系',d.book_type_name as '教材类型',a.bar_cord as '条形码',a. approve as '审核',a.student_count as '学生数',"+
"a.student_class as '班级',a.approver_ID as '审核人ID',a.course_name
as '课程名' "+
"From book_order_table a, department_type b, user_info_table c, book_type_table d where a.book_type=d.book_type and a.user_ID=c.user_ID and a.department=b.department_number and c.department=b.department_number ";
else if(iUsId>=2000) //教师查询自己表单
sql+="Select c.user_name as '授课人',a.ISBN as 'ISBN号',a.book_name as '教材名',a. publisher as '出版社',a.pub_time as '出版时间',"+
"a.author_name as '作者',b.department_name as '所属院系',d.book_type_name as '教材类型',a.bar_cord as '条形码',a. approve as '审核',a.student_count as '学生数',"+
"a.student_class as '班级',a.approver_ID as '审核人',course_name as '课程名' "+" From book_order_table a,department_type b,user_info_table c,book_type_table d where a.book_type=d.book_type and
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第10页为计算机毕业论文部分......