欢迎来到天天文库
浏览记录
ID:33519066
大小:210.50 KB
页数:50页
时间:2019-02-26
《图书管理系统c++源代码》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespaceWindowsApplication1{publicpartialclassForm_BuyAndSale:Form{publicForm_BuyAndSale(){InitializeComponent();}SQLsql;stringl
2、astSQL="";publicvoidshow(){listBox1.Items.Clear();listBox2.Items.Clear();listBox3.Items.Clear();if(sql.rows.GetLength(0)!=0){for(inti=0;i3、ws[i,2].ToString());}}else{listBox1.Text="";listBox2.Text="";listBox3.Text="";MessageBox.Show("无符合查询条件的结果!","提示");}}privatevoidForm_BuyAndSale_Load(objectsender,EventArgse){//将窗体的任务栏隐藏this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None;sql=newSQL(Form_load.connectionSt4、ring);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.DateTime.Now.Year.ToString()+STR.add0(Convert.ToSt5、ring(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();lastSQL="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsale6、date<'"+max+"'";}privatevoidbutThisYear_Click(objectsender,EventArgse){stringmin=System.DateTime.Now.Year.ToString()+"0000";stringmax=System.DateTime.Now.Year.ToString()+"9999";sql.ExecuteSQL("select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'");show();lastSQ7、L="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'";}privatevoidbutAll_Click(objectsender,EventArgse){sql.ExecuteSQL("select*fromts_tushuxiaoshou");show();lastSQL="select*fromts_tushuxiaoshou";}privatevoidbutSearch_Click(objectsender,EventArgse){try{int.Pa8、rse(Min.Text);int.Parse(Max.Text);}catch
3、ws[i,2].ToString());}}else{listBox1.Text="";listBox2.Text="";listBox3.Text="";MessageBox.Show("无符合查询条件的结果!","提示");}}privatevoidForm_BuyAndSale_Load(objectsender,EventArgse){//将窗体的任务栏隐藏this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None;sql=newSQL(Form_load.connectionSt
4、ring);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.DateTime.Now.Year.ToString()+STR.add0(Convert.ToSt
5、ring(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();lastSQL="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsale
6、date<'"+max+"'";}privatevoidbutThisYear_Click(objectsender,EventArgse){stringmin=System.DateTime.Now.Year.ToString()+"0000";stringmax=System.DateTime.Now.Year.ToString()+"9999";sql.ExecuteSQL("select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'");show();lastSQ
7、L="select*fromts_tushuxiaoshouwheresaledate>'"+min+"'andsaledate<'"+max+"'";}privatevoidbutAll_Click(objectsender,EventArgse){sql.ExecuteSQL("select*fromts_tushuxiaoshou");show();lastSQL="select*fromts_tushuxiaoshou";}privatevoidbutSearch_Click(objectsender,EventArgse){try{int.Pa
8、rse(Min.Text);int.Parse(Max.Text);}catch
此文档下载收益归作者所有