歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

圖書管理系統(tǒng)C++源代碼

  • 資源ID:28395736       資源大?。?span id="zln0pr0" class="font-tahoma">210.50KB        全文頁數(shù):50頁
  • 資源格式: DOC        下載積分:15積分
快捷下載 游客一鍵下載
會員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要15積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號,方便查詢和重復(fù)下載(系統(tǒng)自動生成)
支付方式: 支付寶    微信支付   
驗證碼:   換一換

 
賬號:
密碼:
驗證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會被瀏覽器默認(rèn)打開,此種情況可以點擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請知曉。

圖書管理系統(tǒng)C++源代碼

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication1 public partial class Form_BuyAndSale : Form public Form_BuyAndSale() InitializeComponent(); SQL sql; string lastSQL = "" public void show() listBox1.Items.Clear(); listBox2.Items.Clear(); listBox3.Items.Clear(); if (sql.rows.GetLength(0) != 0) for (int i = 0; i < sql.rows.GetLength(0); i+) listBox1.Items.Add(sql.rowsi, 0.ToString(); listBox2.Items.Add(sql.rowsi, 1.ToString(); listBox3.Items.Add(sql.rowsi, 2.ToString(); else listBox1.Text = "" listBox2.Text = "" listBox3.Text = "" MessageBox.Show("無符合查詢條件的結(jié)果!", "提示"); private void Form_BuyAndSale_Load(object sender, EventArgs e) /將窗體的任務(wù)欄隱藏 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; sql = new SQL(Form_load .connectionString ); sql.ExecuteSQL("select * from ts_tushuxiaoshou"); show(); lastSQL = "select * from ts_tushuxiaoshou " private void butThisQuarter_Click(object sender, EventArgs e) int month = System.DateTime.Now.Month; int space = (3 - month % 3) % 3; string min = System.DateTime.Now.Year.ToString() + STR.add0(Convert.ToString(month + space - 2) + "00" string max = System.DateTime.Now.Year.ToString() + STR.add0(Convert.ToString(month + space) + "99" sql.ExecuteSQL("select * from ts_tushuxiaoshou where saledate>" + min + " and saledate<" + max + ""); show(); lastSQL = "select * from ts_tushuxiaoshou where saledate>" + min + " and saledate<" + max + "" private void butThisYear_Click(object sender, EventArgs e) string min = System.DateTime.Now.Year.ToString() + "0000" string max = System.DateTime.Now.Year.ToString() + "9999" sql.ExecuteSQL("select * from ts_tushuxiaoshou where saledate>" + min + " and saledate<" + max + ""); show(); lastSQL = "select * from ts_tushuxiaoshou where saledate>" + min + " and saledate<" + max + "" private void butAll_Click(object sender, EventArgs e) sql.ExecuteSQL("select * from ts_tushuxiaoshou"); show(); lastSQL = "select * from ts_tushuxiaoshou " private void butSearch_Click(object sender, EventArgs e) try int.Parse(Min.Text); int.Parse(Max.Text); catch MessageBox.Show("數(shù)值格式不正確!"); Min.Text = "" Max.Text = "" return; if (int.Parse(Min.Text) > int.Parse(Max.Text) MessageBox.Show("最小值應(yīng)小于或等于最大值!", "提示"); Min.Text = "" Max.Text = "" return; sql.ExecuteSQL("select * from ts_tushuxiaoshou where salequantity between " + Min.Text + " and " + Max.Text); show(); lastSQL = "select * from ts_tushuxiaoshou where salequantity between " + Min.Text + " and " + Max.Text; private void button1_Click(object sender, EventArgs e) this.Close(); using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication1 public partial class Form_Customer : Form public Form_Customer() InitializeComponent(); SQL sql; string oldcustomerID = "" public static string CUSTOMERID = "" public static string CUSTOMERNAME = "" public void show() if (sql.rows.GetLength(0) != 0) customerID.Text = sql.rowssql.getPos(), 0.ToString(); customername.Text = sql.rowssql.getPos(), 1.ToString(); customerinfo.Text = sql.rowssql.getPos(), 2.ToString(); customeraddress.Text = sql.rowssql.getPos(), 3.ToString(); customertelephone.Text = sql.rowssql.getPos(), 4.ToString(); customersex.Text = sql.rowssql.getPos(), 5.ToString(); customeremail.Text = sql.rowssql.getPos(), 6.ToString(); else customerID.Text = "" customername.Text = "" customerinfo.Text = "" customeraddress.Text = "" customertelephone.Text = "" customersex.Text = "" customeremail.Text = "" MessageBox.Show("無符合查詢條件的結(jié)果!", "提示"); CUSTOMERID = customerID.Text; CUSTOMERNAME = customername.Text; private void Form_Customer_Load(object sender, EventArgs e) /將窗體的任務(wù)欄隱藏 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; sql = new SQL(Form_load .connectionString ); sql.ExecuteSQL("select * from ts_kehu order by customerID"); show(); private void AddOrder_Click(object sender, EventArgs e) if (customerID.Text != "") Form_Customer_AddOrder child = new Form_Customer_AddOrder(); child.ShowDialog(); else MessageBox.Show("請先選擇一個客戶!", "提示"); private void butAlter_Click(object sender, EventArgs e) if (butAlter.Text = "修改") butAlter.Text = "更新" oldcustomerID = customerID.Text; customerID.ReadOnly = false; customername.ReadOnly = false; customerinfo.ReadOnly = false; customeraddress.ReadOnly = false; customertelephone.ReadOnly = false; customersex.ReadOnly = false; customeremail.ReadOnly = false; butAdd.Enabled = false; butDelete.Enabled = false; butFirst.Enabled = false; butPrev.Enabled = false; butNext.Enabled = false; butLast.Enabled = false; butSearch.Enabled = false; butLookOverOrders.Enabled = false; butShowAll.Enabled = false; AddOrder.Enabled = false; else if (sql.ExecuteSQL("update ts_kehu set customerID=" + customerID.Text + ",customername=" + customername.Text + ",customerinfo=" + customerinfo.Text + ",customeraddress=" + customeraddress.Text + ",customertelephone=" + customertelephone.Text + ",customersex=" + customersex.Text + ",customeremail=" + customeremail.Text + " where customerID=" + oldcustomerID + "") = false | sql.ExecuteSQL("update ts_kehudingdan set customerID=" + customerID.Text + " where customerID=" + oldcustomerID + "") = false) show(); else CUSTOMERID = customerID.Text; CUSTOMERNAME = customername.Text; customerID.ReadOnly = true; customername.ReadOnly = true; customerinfo.ReadOnly = true; customeraddress.ReadOnly = true; customertelephone.ReadOnly = true; customersex.ReadOnly = true; customeremail.ReadOnly = true; butAlter.Text = "修改" butAdd.Enabled = true; butDelete.Enabled = true; butFirst.Enabled = true; butPrev.Enabled = true; butNext.Enabled = true; butLast.Enabled = true; butSearch.Enabled = true; butLookOverOrders.Enabled = true; AddOrder.Enabled = true; butShowAll.Enabled = true; private void butAdd_Click(object sender, EventArgs e) try if (butAdd.Text = "添加") butAdd.Text = "提交" customerID.Text = "" customername.Text = "" customerinfo.Text = "" customeraddress.Text = "" customertelephone.Text = "" customersex.Text = "" customeremail.Text = "" customerID.ReadOnly = false; customername.ReadOnly = false; customerinfo.ReadOnly = false; customeraddress.ReadOnly = false; customertelephone.ReadOnly = false; customersex.ReadOnly = false; customeremail.ReadOnly = false; butAlter.Enabled = false; butDelete.Enabled = false; butFirst.Enabled = false; butPrev.Enabled = false; butNext.Enabled = false; butLast.Enabled = false; butSearch.Enabled = false; butLookOverOrders.Enabled = false; AddOrder.Enabled = false; butShowAll.Enabled = false; else if (this.customeraddress.Text = "") MessageBox.Show("請輸入完整信息!"); else if (this.customeremail.Text = "") MessageBox.Show("請輸入完整信息!"); else if (this.customerID.Text = "") MessageBox.Show("請輸入完整信息"); else if (this.customerinfo.Text = "") MessageBox.Show("請輸入完整信息!"); else if (this.customername.Text = "") MessageBox.Show("請輸入完整信息!"); else if (this.customersex.Text = "") MessageBox.Show("請輸入完整信息!"); else if (sql.ExecuteSQL("insert into ts_kehu values(" + customerID.Text + "," + customername.Text + "," + customerinfo.Text + "," + customeraddress.Text + "," + customertelephone.Text + "," + customersex.Text + "," + customeremail.Text + ")") = false) show(); else CUSTOMERID = customerID.Text; CUSTOMERNAME = customername.Text; customerID.ReadOnly = true; customername.ReadOnly = true; customerinfo.ReadOnly = true; customeraddress.ReadOnly = true; customertelephone.ReadOnly = true; customersex.ReadOnly = true; customeremail.ReadOnly = true; butAdd.Text = "添加" butAlter.Enabled = true; butDelete.Enabled = true; butFirst.Enabled = true; butPrev.Enabled = true; butNext.Enabled = true; butLast.Enabled = true; butSearch.Enabled = true; butLookOverOrders.Enabled = true; AddOrder.Enabled = true; butShowAll.Enabled = true; catch (Exception e1) MessageBox.Show(e1.Message); private void butDelete_Click(object sender, EventArgs e) sql.ExecuteSQL("delete from ts_kehu where customerID=" + customerID.Text + ""); show(); private void butShowAll_Click(object sender, EventArgs e) sql.ExecuteSQL("select * from ts_kehu order by customerID"); show(); private void butSearch_Click(object sender, EventArgs e) if (comboBox1.Text = "客戶名稱") if (comboBox2.Text = "精確") sql.ExecuteSQL("select * from ts_kehu where customername=" + textForSearch.Text + " order by customerID"); show(); else sql.ExecuteSQL("select * from ts_kehu where customername like %" + textForSearch.Text + "% order by customerID"); show(); else if (comboBox2.Text = "精確") sql.ExecuteSQL("select * from ts_kehu where customeremail=" + textForSearch.Text + " order by customerID"); show(); else sql.ExecuteSQL("select * from ts_kehu where customeremail like %" + textForSearch.Text + "% order by customerID"); show(); private void butFirst_Click(object sender, EventArgs e) sql.pointToFirst(); show(); private void butPrev_Click(object sender, EventArgs e) sql.pointToPrev(); show(); private void butNext_Click(object sender, EventArgs e) sql.pointToNext(); show(); private void butLast_Click(object sender, EventArgs e) sql.pointToLast(); show(); private void butLookOverOrders_Click(object sender, EventArgs e) Form_Customer_LookOverOrders child = new Form_Customer_LookOverOrders(); child.ShowDialog(); private void button1_Click(object sender, EventArgs e) this.Close(); using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication1 public partial class Form_Customer : Form public Form_Customer() InitializeComponent(); SQL sql; string oldcustomerID = "" public static string CUSTOMERID = "" public static string CUSTOMERNAME = "" public void show() if (sql.rows.GetLength(0) != 0) customerID.Text = sql.rowssql.getPos(), 0.ToString(); customername.Text = sql.rowssql.getPos(), 1.ToString(); customerinfo.Text = sql.rowssql.getPos(), 2.ToString(); customeraddress.Text = sql.rowssql.getPos(), 3.ToString(); customertelephone.Text = sql.rowssql.getPos(), 4.ToString(); customersex.Text = sql.rowssql.getPos(), 5.ToString(); customeremail.Text = sql.rowssql.getPos(), 6.ToString(); else customerID.Text = "" customername.Text = "" customerinfo.Text = "" customeraddress.Text = "" customertelephone.Text = "" customersex.Text = "" customeremail.Text = "" MessageBox.Show("無符合查詢條件的結(jié)果!", "提示"); CUSTOMERID = customerID.Text; CUSTOMERNAME = customername.Text; private void Form_Customer_Load(object sender, EventArgs e) /將窗體的任務(wù)欄隱藏 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; sql = new SQL(Form_load .connectionString ); sql.ExecuteSQL("select * from ts_kehu order by customerID"); show(); private void AddOrder_Click(object sender, EventArgs e) if (customerID.Text != "") Form_Customer_AddOrder child = new Form_Customer_AddOrder(); child.ShowDialog(); else MessageBox.Show("請先選擇一個客戶!", "提示"); private void butAlter_Click(object sender, EventArgs e) if (butAlter.Text = "修改") butAlter.Text = "更新" oldcustomerID = customerID.Text; customerID.ReadOnly = false; customername.ReadOnly = false; customerinfo.ReadOnly = false; customeraddress.ReadOnly = false; customertelephone.ReadOnly = false; customersex.ReadOnly = false; customeremail.ReadOnly = false; butAdd.Enabled = false; butDelete.Enabled = false; butFirst.Enabled = false; butPrev.Enabled = false; butNext.Enabled = false; butLast.Enabled = false; butSearch.Enabled = false; butLookOverOrders.Enabled = false; butShowAll.Enabled = false; AddOrder.Enabled = false; else if (sql.ExecuteSQL("update ts_kehu set customerID=" + customerID.Text + ",customername=" + customername.Text + ",customerinfo=" + customerinfo.Text + ",customeraddress=" + customeraddress.Text + ",customertelephone=" + customertelephone.Text + ",customersex=" + customersex.Text + ",customeremail=" + customeremail.Text + " where customerID=" + oldcustomerID + "") = false | sql.ExecuteSQL("update ts_kehudingdan set customerID=" + customerID.Text

注意事項

本文(圖書管理系統(tǒng)C++源代碼)為本站會員(仙***)主動上傳,裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng)(點擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因為網(wǎng)速或其他原因下載失敗請重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!