欢迎来到天天文库
浏览记录
ID:6328291
大小:210.50 KB
页数:50页
时间:2018-01-10
《图书管理系统c++源代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespaceWindowsApplication1{publicpartialclassForm_BuyAndSale:Form{publicForm_BuyAndSale(){InitializeComponent();}SQ
2、Lsql;stringlastSQL="";publicvoidshow(){listBox1.Items.Clear();listBox2.Items.Clear();listBox3.Items.Clear();if(sql.rows.GetLength(0)!=0){for(inti=0;i3、istBox3.Items.Add(sql.rows[i,2].ToString());}}else{listBox1.Text="";listBox2.Text="";listBox3.Text="";MessageBox.Show("无符合查询条件的结果!","提示");}}privatevoidForm_BuyAndSale_Load(objectsender,EventArgse){//将窗体的任务栏隐藏this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.No4、ne;sql=newSQL(Form_load.connectionString);sql.ExecuteSQL("select*fromts_tushuxiaoshou");show();lastSQL="select*fromts_tushuxiaoshou";}privatevoidbutThisQuarter_Click(objectsender,EventArgse){intmonth=System.DateTime.Now.Month;intspace=(3-month%3)%3;stringmin=System.Da5、teTime.Now.Year.ToString()+STR.add0(Convert.ToString(month+space-2))+"00";stringmax=System.DateTime.Now.Year.ToString()+STR.add0(Convert.ToString(month+space))+"99";sql.ExecuteSQL("select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'");show();lastSQ6、L="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'";}privatevoidbutThisYear_Click(objectsender,EventArgse){stringmin=System.DateTime.Now.Year.ToString()+"0000";stringmax=System.DateTime.Now.Year.ToString()+"9999";sql.ExecuteSQL("select*fromts_t7、ushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'");show();lastSQL="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'";}privatevoidbutAll_Click(objectsender,EventArgse){sql.ExecuteSQL("select*fromts_tushuxiaoshou");show();lastSQL="select*f8、romts_tushuxiaoshou";}privatevoidbutSearch_Click(objectsender,EventArgse){try{int.Parse(Min.Text);int.Parse(Max.Text);}catch
3、istBox3.Items.Add(sql.rows[i,2].ToString());}}else{listBox1.Text="";listBox2.Text="";listBox3.Text="";MessageBox.Show("无符合查询条件的结果!","提示");}}privatevoidForm_BuyAndSale_Load(objectsender,EventArgse){//将窗体的任务栏隐藏this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.No
4、ne;sql=newSQL(Form_load.connectionString);sql.ExecuteSQL("select*fromts_tushuxiaoshou");show();lastSQL="select*fromts_tushuxiaoshou";}privatevoidbutThisQuarter_Click(objectsender,EventArgse){intmonth=System.DateTime.Now.Month;intspace=(3-month%3)%3;stringmin=System.Da
5、teTime.Now.Year.ToString()+STR.add0(Convert.ToString(month+space-2))+"00";stringmax=System.DateTime.Now.Year.ToString()+STR.add0(Convert.ToString(month+space))+"99";sql.ExecuteSQL("select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'");show();lastSQ
6、L="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'";}privatevoidbutThisYear_Click(objectsender,EventArgse){stringmin=System.DateTime.Now.Year.ToString()+"0000";stringmax=System.DateTime.Now.Year.ToString()+"9999";sql.ExecuteSQL("select*fromts_t
7、ushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'");show();lastSQL="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'";}privatevoidbutAll_Click(objectsender,EventArgse){sql.ExecuteSQL("select*fromts_tushuxiaoshou");show();lastSQL="select*f
8、romts_tushuxiaoshou";}privatevoidbutSearch_Click(objectsender,EventArgse){try{int.Parse(Min.Text);int.Parse(Max.Text);}catch
此文档下载收益归作者所有