public FormOuttime() { InitializeComponent(); string srct = "outtime"; this.dataGridView1.DataSource = ExecuteQuery.Query("select user_cardno '借书证号', book_isbn 'ISBN书号', lendout '借出时间', timelimit '期限时间' from outtime", srct).Tables["outtime"]; }
private void btn_searchseats_Click(object sender, EventArgs e) { string seats = text_seats.Text.Trim(); string srct = "seats"; this.dataGridView2.DataSource = ExecuteQuery.Query("select seatno '座位号', seatstatus '当前状态' from seats where seatno like '%" + seats + "%'", srct).Tables["seats"]; }
private void button1_Click(object sender, EventArgs e) { string isbn = textBox1.Text.Trim(); string srct = "lendinfo"; this.dataGridView1.DataSource = ExecuteQuery.Query("select user_cardno '借书证号', book_isbn 'ISBN书号', lendout '借出时间', timelimit '期限时间' from lendinfo where returnin is null and book_isbn like '%" + isbn + "%'", srct).Tables["lendinfo"]; }
private void btn_search_Click(object sender, EventArgs e) { string cardno = text_cardno.Text.Trim(); string depa = text_depa.Text.Trim(); string name = text_name.Text.Trim(); string tel = text_tel.Text.Trim(); string srct = "userinfo"; this.dataGridView1.DataSource = ExecuteQuery.Query("select user_cardno '借书证号', user_username '姓名', user_sex '性别', user_vocation '职称', user_availnumber '可借数量', user_lendnumber '已借数量', user_department '工作部门', user_tel '联系电话', login_account '账户名', user_canseat '是否允许选座' from userinfo where user_cardno like '%" + cardno + "%' and user_username like '%" + name + "%' and user_department like '%" + depa + "%' and user_tel like '%" + tel + "%'", srct).Tables["userinfo"]; }
private void btn_search_Click_1(object sender, EventArgs e) { string isbn = text_isbn.Text.Trim(); string press = text_press.Text.Trim(); string name = text_bookname.Text.Trim(); string author = text_author.Text.Trim(); string srct = "bookinfo"; this.dataGridView1.DataSource = ExecuteQuery.Query("select book_isbn 'ISBN书号', book_bookname '书名', book_author '作者', book_press '出版社', book_totalamount '馆藏数量', book_availamount '可借数量' from bookinfo where book_isbn like '%" + isbn + "%' and book_press like '%" + press + "%' and book_bookname like '%" + name + "%' and book_author like '%" + author + "%'", srct).Tables["bookinfo"]; }