數(shù)據(jù)庫課程設(shè)計(jì)倉(cāng)庫管理系統(tǒng)范文樣本_第1頁
數(shù)據(jù)庫課程設(shè)計(jì)倉(cāng)庫管理系統(tǒng)范文樣本_第2頁
數(shù)據(jù)庫課程設(shè)計(jì)倉(cāng)庫管理系統(tǒng)范文樣本_第3頁
數(shù)據(jù)庫課程設(shè)計(jì)倉(cāng)庫管理系統(tǒng)范文樣本_第4頁
數(shù)據(jù)庫課程設(shè)計(jì)倉(cāng)庫管理系統(tǒng)范文樣本_第5頁
已閱讀5頁,還剩96頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

任務(wù)書1、課程設(shè)計(jì)題目倉(cāng)庫管理系統(tǒng)2、設(shè)計(jì)任務(wù)和內(nèi)容一種小型通用倉(cāng)庫管理系統(tǒng)是實(shí)現(xiàn)公司對(duì)庫存商品出庫、入庫進(jìn)行高效管理。通過應(yīng)用系統(tǒng)應(yīng)能結(jié)合銷售狀況對(duì)庫存商品進(jìn)行錄入、刪除、修改等操作。按照一定條件,查詢、記錄符合條件商品信息;并且對(duì)查詢、記錄成果有一定輸出。本課題任務(wù)是開發(fā)一種小型倉(cāng)庫管理系統(tǒng),并撰寫符合規(guī)范課程設(shè)計(jì)闡明書以體現(xiàn)設(shè)計(jì)過程和設(shè)計(jì)成果。3、設(shè)計(jì)環(huán)節(jié)和規(guī)定設(shè)計(jì)環(huán)節(jié):一方面進(jìn)行有關(guān)資料查閱和學(xué)習(xí),理解基本業(yè)務(wù)流程和系統(tǒng)數(shù)據(jù)功能規(guī)定。然后結(jié)合軟件工程理論和教材中數(shù)據(jù)庫設(shè)計(jì)六個(gè)階段(重點(diǎn)是前三個(gè)階段)完畢設(shè)計(jì)任務(wù),即系統(tǒng)構(gòu)造設(shè)計(jì)(需求分析、概念構(gòu)造設(shè)計(jì)、邏輯構(gòu)造設(shè)計(jì)、物理構(gòu)造設(shè)計(jì))和系統(tǒng)功能設(shè)計(jì)。

設(shè)計(jì)規(guī)定:1、撰寫課程設(shè)計(jì)闡明書。其規(guī)定如下:(1)基本規(guī)定:①能反映完畢了上述設(shè)計(jì)內(nèi)容規(guī)定。

②規(guī)定撰寫不少于5000個(gè)文字(20頁)文檔。

③文檔中至少要涉及:數(shù)據(jù)流圖、數(shù)據(jù)字典、E-R圖、數(shù)據(jù)庫表詳細(xì)闡明、系統(tǒng)功能構(gòu)造圖、重要功能模塊闡明。

④課程設(shè)計(jì)闡明書一律用碳素墨水書寫,其中顧客界面設(shè)計(jì)可以附界面計(jì)算機(jī)截圖或手工繪圖。(2)文檔格式規(guī)定(遵循數(shù)據(jù)庫原理及應(yīng)用課程設(shè)計(jì)大綱上規(guī)定)其中,正文某些:①分章、層次等,每一章從新一頁開始。②章節(jié)安排可如下安排.概述:涉及項(xiàng)目背景、編寫目、軟件定義、開發(fā)環(huán)境等內(nèi)容。

.需求分析:?jiǎn)栴}陳述、需完畢功能。以數(shù)據(jù)流圖和數(shù)據(jù)字典表達(dá)。.概念構(gòu)造設(shè)計(jì):將上述需求分析成果抽象為ER模型圖。

.邏輯構(gòu)造設(shè)計(jì):把ER模型圖轉(zhuǎn)換為關(guān)系表;描述每一種基本表關(guān)系。并進(jìn)行規(guī)范化;定義視圖、定義索引、主核心字、定義權(quán)限。.軟件功能設(shè)計(jì):畫出系統(tǒng)功能構(gòu)造圖,描述每個(gè)功能所完畢任務(wù)。

.代碼設(shè)計(jì)和界面設(shè)計(jì):給出重要功能代碼并有恰當(dāng)闡明;界面設(shè)計(jì)要合理,給出重要界面。2、一種可運(yùn)營(yíng)倉(cāng)庫管理系統(tǒng)原型。(可選)教師簽名:摘要隨著計(jì)算機(jī)技術(shù)飛速發(fā)展,計(jì)算機(jī)在公司管理中應(yīng)用普及,運(yùn)用計(jì)算機(jī)實(shí)現(xiàn)管理公司勢(shì)在必行。而倉(cāng)庫管理系統(tǒng)是典型信息管理系統(tǒng),其開發(fā)重要涉及后臺(tái)數(shù)據(jù)庫建立和維護(hù)以及前端應(yīng)用程序開發(fā)兩個(gè)方面。對(duì)前者規(guī)定建立起數(shù)據(jù)一致性和完整性強(qiáng)、數(shù)據(jù)安全性好庫。而對(duì)于后者則規(guī)定應(yīng)用程序功能完備,易使用等特點(diǎn)。本文通過度析瀏覽器/服務(wù)器構(gòu)造特點(diǎn)并結(jié)合公司倉(cāng)儲(chǔ)管理實(shí)際狀況,提出了基于B/S構(gòu)造中小型公司倉(cāng)庫管理系統(tǒng)基本設(shè)計(jì)思想,簡(jiǎn)要簡(jiǎn)介了系統(tǒng)各功能模塊及數(shù)據(jù)庫設(shè)計(jì),著重討論了用ASP.NET技術(shù)和SQLServer開發(fā)公司倉(cāng)庫管理系統(tǒng)時(shí)數(shù)據(jù)庫訪問技術(shù)和動(dòng)態(tài)網(wǎng)頁制作技術(shù),并給出了某些實(shí)當(dāng)代碼。通過該系統(tǒng),使學(xué)生可以以便地在公司內(nèi)部網(wǎng)上進(jìn)行倉(cāng)儲(chǔ)管理。該B/S構(gòu)造系統(tǒng)在WindowsXP系統(tǒng)和VS.NET平臺(tái)下開發(fā)完畢,使用C#作為ASP.NET開發(fā)語言,SQLServer作為后臺(tái)數(shù)據(jù)庫,該數(shù)據(jù)庫系統(tǒng)在安全性、精確性、運(yùn)營(yíng)速度方面均有絕對(duì)優(yōu)勢(shì),并且可以對(duì)容量較大數(shù)據(jù)庫進(jìn)行解決,效率高。系統(tǒng)有較高安全性和較好性能本文中除了有對(duì)程序系統(tǒng)分析、總體設(shè)計(jì)、數(shù)據(jù)庫設(shè)計(jì)、功能實(shí)現(xiàn)等主體某些外,在這之前還簡(jiǎn)介了與公司倉(cāng)庫管理系統(tǒng)有關(guān)信息、VS.NET與SQL無縫鏈接技術(shù)等。核心詞倉(cāng)庫管理;信息管理系統(tǒng);B/S構(gòu)造;數(shù)據(jù)庫管理目錄概述1.1項(xiàng)目背景1.2編寫目1.3軟件定義1.4開發(fā)環(huán)境需求分析2.1可行性分析2.2功能分析2.3數(shù)據(jù)流圖2.4數(shù)據(jù)字典概念構(gòu)造設(shè)計(jì)3.1E-R圖邏輯構(gòu)造設(shè)計(jì)4.1關(guān)系表4.2基本表關(guān)系。4.3規(guī)范化軟件功能設(shè)計(jì)5.1系統(tǒng)功能構(gòu)造圖5.2功能任務(wù)簡(jiǎn)介代碼設(shè)計(jì)和界面設(shè)計(jì)概述1.1項(xiàng)目背景倉(cāng)庫存儲(chǔ)貨品品種繁多,堆存方式以及解決過程也非常復(fù)雜,隨著業(yè)務(wù)量增長(zhǎng),倉(cāng)庫管理者需要解決信息量會(huì)大幅上升,因而往往很難及時(shí)精確掌握整個(gè)倉(cāng)庫運(yùn)作狀態(tài)。針對(duì)這一狀況,本系統(tǒng)在滿足倉(cāng)庫基本管理功能基本上發(fā)揮信息系統(tǒng)智能化,減輕倉(cāng)庫管理人員和操作人員工作承擔(dān)。系統(tǒng)重要實(shí)現(xiàn)目的是監(jiān)控整個(gè)倉(cāng)庫運(yùn)轉(zhuǎn)狀況;提供完善出入庫登記功能且擁有便捷查詢功能。1.2編寫目依照任務(wù)書規(guī)定,假想一小型公司擁有各種倉(cāng)庫,擁有各種物品,且物品在倉(cāng)庫中存在耗損狀況。開發(fā)數(shù)據(jù)庫和系統(tǒng)平臺(tái)解決此問題。1.3軟件簡(jiǎn)介本系統(tǒng)涉及一下幾種模塊。1)貨品管理提供入庫登記、出庫登記、損耗登記三個(gè)方面登記功能以便修改庫存信息。2)檔案管理提供貨品檔案設(shè)立、倉(cāng)庫設(shè)立、分類設(shè)立三個(gè)方面內(nèi)容。分別容許顧客更改貨品屬性,倉(cāng)庫屬性,分類屬性。3)查詢記錄提供入庫查詢、出庫查詢、耗損查詢、庫存查詢四個(gè)方面內(nèi)容。容許顧客隨時(shí)查詢倉(cāng)庫現(xiàn)狀。4)系統(tǒng)維護(hù)提供貨品檔案設(shè)立、倉(cāng)庫設(shè)立、分類設(shè)立三個(gè)方面內(nèi)容。分別容許顧客更改貨品屬性,倉(cāng)庫屬性,分類屬性。5)系統(tǒng)信息提供顧客管理,更改密碼,系統(tǒng)闡明,退出系統(tǒng)四項(xiàng)功能。使軟件功能更加完善。1.4開發(fā)環(huán)境語言環(huán)境C#語言平臺(tái)環(huán)境SQLServer,VisualStudio系統(tǒng)開發(fā)環(huán)境Win7,解決器T8300,內(nèi)存2G,顯卡Geforce8600GT系統(tǒng)運(yùn)營(yíng)環(huán)境WinXp/Vista/Win7,解決器第二章需求分析2.1可行性分析本軟件所有解決流程內(nèi)置,通過界面操作可以完畢所有功能能,使用者無需具備SQL及C#語言知識(shí),且軟件所有功能完全可以達(dá)到編寫目,軟件運(yùn)營(yíng)硬件規(guī)定不高,開發(fā)軟件是完全可行。2.2功能分析本軟件所有解決流程內(nèi)置,通過界面操作可以完畢所有功能能,使用者無需具備SQL及C#語言知識(shí),且軟件所有功能完全可以達(dá)到編寫目,軟件運(yùn)營(yíng)硬件規(guī)定不高,開發(fā)軟件是完全可行。2.3數(shù)據(jù)流圖略2.4數(shù)據(jù)字典1.數(shù)據(jù)項(xiàng)數(shù)據(jù)項(xiàng)名別名含義闡明類型長(zhǎng)度取值范疇GoodsID物品號(hào)標(biāo)志每個(gè)物品int40-65535SN庫存編號(hào)標(biāo)志每條庫存信息int40-65535SortID類別ID標(biāo)志類別int40-65535StorageID倉(cāng)庫ID標(biāo)志倉(cāng)庫編號(hào)int40-65535InOrder入庫單號(hào)每條入庫操作相應(yīng)單號(hào)int40-65535OutOrder出庫單號(hào)每條出庫操作相應(yīng)單號(hào)int40-65535BreakOrder損耗單號(hào)每條損耗操作相應(yīng)單號(hào)int40-655352.數(shù)據(jù)流數(shù)據(jù)流名闡明數(shù)據(jù)來源數(shù)據(jù)去向構(gòu)成存儲(chǔ)入庫單把入庫信息存入入庫單貨品入庫單入庫單號(hào),倉(cāng)庫號(hào),物品號(hào),入庫數(shù)量,入庫單位,入庫日期存儲(chǔ)出庫單把出庫信息存入出庫單倉(cāng)庫出庫單出庫單號(hào),倉(cāng)庫號(hào),物品號(hào),出庫數(shù)量,出庫單位,出庫日期存儲(chǔ)耗損單把損耗信息存入損耗單倉(cāng)庫損耗表耗損單號(hào),倉(cāng)庫號(hào),物品號(hào),耗損數(shù)量,耗損日期,損耗備注3.數(shù)據(jù)構(gòu)造數(shù)據(jù)構(gòu)造名含義闡明構(gòu)成貨品操作入庫出庫及損耗物品物品號(hào),物品名,類別名稱,規(guī)格倉(cāng)庫存儲(chǔ)所有貨品載體倉(cāng)庫ID,倉(cāng)庫名稱4.數(shù)據(jù)存儲(chǔ)數(shù)據(jù)存儲(chǔ)名闡明編號(hào)流入數(shù)據(jù)流流出數(shù)據(jù)流構(gòu)成入庫單所有入庫信息記錄D1入庫單號(hào),倉(cāng)庫號(hào),物品號(hào),入庫數(shù)量,入庫單位,入庫日期,入庫備注入庫單號(hào),倉(cāng)庫號(hào),物品號(hào),入庫數(shù)量,入庫單位,入庫日期,入庫備注出庫單所有出庫信息記錄D2出庫單號(hào),倉(cāng)庫號(hào),物品號(hào),出庫數(shù)量,出庫單位,出庫日期,出庫備注出庫單號(hào),倉(cāng)庫號(hào),物品號(hào),出庫數(shù)量,出庫單位,出庫日期,出庫備注損耗單所有損耗信息記錄D3耗損單號(hào),倉(cāng)庫號(hào),物品號(hào),耗損數(shù)量,耗損日期,損耗備注耗損單號(hào),倉(cāng)庫號(hào),物品號(hào),耗損數(shù)量,耗損日期,損耗備注5.解決過程解決過程名闡明輸入輸出解決入庫審核對(duì)入庫申請(qǐng)進(jìn)行審核入庫申請(qǐng)批準(zhǔn)入庫申請(qǐng),駁回入庫申請(qǐng)判斷入庫信息完整及數(shù)據(jù)對(duì)的與否,均對(duì)的則通過否則駁回入庫解決將物品存入庫并登記入庫表批準(zhǔn)入庫申請(qǐng)入庫信息,入庫單把貨品入庫并把信息記錄到入庫單出庫審核對(duì)出庫申請(qǐng)進(jìn)行審核出庫申請(qǐng)批準(zhǔn)出庫申請(qǐng),駁回出庫申請(qǐng)判斷出庫操作與否夠權(quán)限并核對(duì)倉(cāng)庫中貨品與否足夠操作,均對(duì)的則通過否則駁回出庫解決將物品出庫并登記入出庫表批準(zhǔn)出庫申請(qǐng)出庫信息,出庫單把貨品出庫并把信息記錄到出庫單損耗審核對(duì)損耗申請(qǐng)進(jìn)行審核損耗申請(qǐng)批準(zhǔn)損耗申請(qǐng),駁回?fù)p耗申請(qǐng)判斷損耗操作權(quán)限與否夠及倉(cāng)庫中與否有此物,均對(duì)的則通過,否則駁回?fù)p耗解決將物品損耗報(bào)廢并登記入損耗表批準(zhǔn)損耗申請(qǐng)損耗信息,損耗表把貨品損耗報(bào)廢并把信息記錄到損耗單第三章概念構(gòu)造設(shè)計(jì)3.1E-R圖圖略第四章邏輯構(gòu)造設(shè)計(jì)4.1關(guān)系表類別信息表類別信息SortInfo字段名數(shù)據(jù)類型主鍵必填字段備注SortIDint是是類別IDSortNameVarchar(10)是類別名稱SortLimitInt是類別權(quán)限2.倉(cāng)庫信息表倉(cāng)庫信息StorageInfo字段名數(shù)據(jù)類型主鍵必填字段備注StoragetIDint是是倉(cāng)庫IDStorageNameVarchar(20)是倉(cāng)庫名稱3.物品信息表物品信息GoodsInfo字段名數(shù)據(jù)類型主鍵必填字段備注GoodsIDint是是類別IDGoodsNameVarchar(20)是類別名稱SortIDInt是類別權(quán)限SpecVarchar(10)類別權(quán)限庫存信息StoreInfo字段名數(shù)據(jù)類型主鍵必填字段備注SNint是是庫存自動(dòng)編號(hào)StoreIDInt是倉(cāng)庫號(hào)GoodsIDInt是物品號(hào)SortIDInt是類別IDGoodsNumInt是數(shù)量EditDateDateTime修改日期4.庫存信息5.入庫信息入庫信息InInfo字段名數(shù)據(jù)類型主鍵必填字段備注InOrderint是是入庫單號(hào)StorageIDInt是倉(cāng)庫號(hào)GoodsIDInt是物品號(hào)InNumInt是入庫數(shù)量InUnitVarchar(20)是入庫單位InDateDateTime入庫日期InRemarkVarchar(100)入庫備注6.出庫信息出庫信息OutInfo字段名數(shù)據(jù)類型主鍵必填字段備注OutOrderint是是出庫單號(hào)StorageIDInt是倉(cāng)庫號(hào)GoodsIDInt是物品號(hào)OutNumInt是出庫數(shù)量OutUnitVarchar(20)是出庫單位OutDateDateTime出庫日期OutRemarkVarchar(100)出庫備注7.入庫信息損耗信息BreakInfo字段名數(shù)據(jù)類型主鍵必填字段備注BreakOrderint是是損耗單號(hào)StorageIDInt是倉(cāng)庫號(hào)GoodsIDInt是物品號(hào)BreakNumInt是損耗數(shù)量BreakDateDateTime損耗日期BreakRemarkVarchar(100)損耗備注8.顧客信息顧客信息UserInfo字段名數(shù)據(jù)類型主鍵必填字段備注UserIDint是是顧客IDUserNameVarchar(20)是顧客名稱UserPasswordVarchar(8)是顧客密碼UserLimitint是顧客權(quán)限4.2基本表關(guān)系4.3規(guī)范化createdatabaseStoreage--物品信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[GoodsInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableGoodsInfoGOCREATETABLEGoodsInfo( GoodsID intidentity(1,1)primarykey, --物品號(hào)編號(hào) 主GoodsName varchar(20)notnull, --物品名SortID intnotnull, --類別ID 外Spec varchar(10) --規(guī)格 可空)--類別信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[SortInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableSortInfoGOCREATETABLESortInfo(SortID intidentity(1,1)primarykey, --類別ID 主SortName varchar(10)notnull, --類別名稱SortLimit intnotnull --類別權(quán)限)--倉(cāng)庫信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[StorageInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableStorageInfoGOCREATETABLEStorageInfo(StorageID intidentity(1,1)primarykey, --倉(cāng)庫ID 主StorageName varchar(20)notnull --倉(cāng)庫名稱)--庫存信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[StoreInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableStoreInfoGOCREATETABLEStoreInfo(SN intidentity(1,1)primarykey, --庫存自動(dòng)編號(hào) 主StoreID intnotnull, --倉(cāng)庫號(hào) 外GoodsID intnotnull, --物品號(hào) 外SortID intnotnull, --類別ID 外GoodsNum intnotnull, --物品數(shù)量EditDate datetime --修改日期 可空)--入庫信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[InInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableInInfoGOCREATETABLEInInfo(InOrder intidentity(1,1)primarykey, --入庫單號(hào) 主StorageID intreferencesStorageInfo(StorageID)notnull, --倉(cāng)庫號(hào) 外GoodsID intreferencesGoodsInfo(GoodsID)notnull, --物品號(hào) 外InNum intnotnull, --入庫數(shù)量InUnit varchar(20), --入庫單位 可空InDate datetime, --入庫日期 可空InRemark varchar(100) --入庫備注 可空)--出庫信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[OutInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableOutInfoGOCREATETABLEOutInfo(OutOrder intidentity(1,1)primarykey, --出庫單號(hào) 主StorageID intreferencesStorageInfo(StorageID)notnull, --倉(cāng)庫號(hào) 外GoodsID intreferencesGoodsInfo(GoodsID)notnull, --物品號(hào) 外OutNum intnotnull, --出庫數(shù)量OutUnit varchar(20), --出庫單位 可空OutDate datetime, --出庫日期 可空OutRemark varchar(100) --出庫備注 可空)--損耗信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[BreakInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableBreakInfoGOCREATETABLEBreakInfo(BreakOrder intidentity(1,1)primarykey, --損耗單號(hào) 主StorageID intreferencesStorageInfo(StorageID)notnull, --倉(cāng)庫號(hào) 外GoodsID intreferencesGoodsInfo(GoodsID)notnull, --物品號(hào) 外BreakNum intnotnull, --損耗數(shù)量BreakDate datetime, --損耗日期 可空BreakRemark varchar(100) --損耗備注 可空)--顧客信息ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[UserInfo]')andOBJECTPROPERTY(id,N'IsUserTable')=1)droptableUserInfoGOCREATETABLEUserInfo(UserID intidentity(1,1)primarykey, --顧客ID 主UserName varchar(20), --顧客名UserPassword varchar(8), --顧客密碼UserLimit int --類別(權(quán)限))第五章軟件功能設(shè)計(jì)5.1系統(tǒng)功能構(gòu)造圖圖略5.2功能任務(wù)簡(jiǎn)介簡(jiǎn)述個(gè)某些功能代碼設(shè)計(jì)1.主界面usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespaceXRX{publicpartialclassMain:Form{publicMain(){InitializeComponent();}privatevoid入庫登記(objectsender,EventArgse){GoodsManage.InManageAa=newXRX.GoodsManage.InManage();Aa.ShowDialog();}privatevoid出庫登記(objectsender,EventArgse){GoodsManage.OutManageAb=newXRX.GoodsManage.OutManage();Ab.ShowDialog();}privatevoid耗損登記(objectsender,EventArgse){GoodsManage.BreakManageAc=newXRX.GoodsManage.BreakManage();Ac.ShowDialog();}privatevoid貨品檔案設(shè)立(objectsender,EventArgse){InfoManage.GoodsInfoBa=newXRX.InfoManage.GoodsInfo();Ba.ShowDialog();}privatevoid倉(cāng)庫檔案設(shè)立(objectsender,EventArgse){InfoManage.StoreInfoBb=newXRX.InfoManage.StoreInfo();Bb.ShowDialog();}privatevoid分類檔案設(shè)立(objectsender,EventArgse){InfoManage.SortInfoBc=newXRX.InfoManage.SortInfo();Bc.ShowDialog();}privatevoid入庫查詢(objectsender,EventArgse){QueryManage.InQueryCa=newXRX.QueryManage.InQuery();Ca.ShowDialog();}privatevoid出庫查詢(objectsender,EventArgse){QueryManage.OutQueryCb=newXRX.QueryManage.OutQuery();Cb.ShowDialog();}privatevoid損耗查詢(objectsender,EventArgse){QueryManage.BreakQueryCc=newXRX.QueryManage.BreakQuery();Cc.ShowDialog();}privatevoid庫存查詢(objectsender,EventArgse){QueryManage.StoreQueryCd=newXRX.QueryManage.StoreQuery();Cd.ShowDialog();}privatevoid備份數(shù)據(jù)(objectsender,EventArgse){SysManage.DataStoreDa=newXRX.SysManage.DataStore();Da.ShowDialog();}privatevoid恢復(fù)數(shù)據(jù)(objectsender,EventArgse){SysManage.DataRevertDb=newXRX.SysManage.DataRevert();Db.ShowDialog();}privatevoid顧客管理(objectsender,EventArgse){OtherManage.UserManageEa=newXRX.OtherManage.UserManage();Ea.ShowDialog();}privatevoid更改密碼(objectsender,EventArgse){OtherManage.EditPasswordEb=newXRX.OtherManage.EditPassword();Eb.ShowDialog();}privatevoid系統(tǒng)闡明(objectsender,EventArgse){OtherManage.HelpEc=newXRX.OtherManage.Help();Ec.ShowDialog();}privatevoid退出系統(tǒng)(objectsender,EventArgse){Application.Exit();}privatevoidMain_FormClosing(objectsender,F(xiàn)ormClosingEventArgse){if(MessageBox.Show("您真要退出本系統(tǒng)嗎?","提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information)==DialogResult.OK)Application.Exit();}privatevoidMain_Load(objectsender,EventArgse){}}}登陸界面usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespaceXRX{publicpartialclassLogin:Form{publicstaticstringstrUName="";publicstaticstringstrUPwd="";publicLogin(){InitializeComponent();}privatevoidLogin_Load(objectsender,EventArgse){Useru=newUser();DataSetds=u.showLogin();this.cboxUName.DataSource=ds.Tables[0].DefaultView;this.cboxUName.DisplayMember="UserName";}privatevoidLogin_Click(objectsender,EventArgse){DataBasedb=newDataBase();SqlParameter[]Pa=newSqlParameter[3];Pa[0]=db.MakeInParam("@UserName",SqlDbType.VarChar,20,this.cboxUName.Text);Pa[1]=db.MakeInParam("@UserPassword",SqlDbType.VarChar,20,this.txtPwd.Text);Pa[2]=db.MakeOutParam("@rtn",SqlDbType.Int,20);db.ExecuteNonQuery(CommandType.StoredProcedure,"sp_Login",Pa);stringrtn=Pa[2].Value.ToString();if(rtn=="1"){Mainmain=newMain();strUName=this.cboxUName.Text;strUPwd=this.txtPwd.Text;this.Hide();main.Show();}elseMessageBox.Show("密碼錯(cuò)誤!","登陸失敗",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}privatevoidExit_Click(objectsender,EventArgse){Application.Exit();}privatevoidcboxUName_SelectedValueChanged(objectsender,EventArgse){DataBasedb=newDataBase();SqlDataReaderdr=db.ExecuteReader(CommandType.Text,"selectUserLimitfromUserInfowhereUserName='"+this.cboxUName.Text.Trim()+"'",null);if(dr.Read()){stringa=dr["UserLimit"].ToString();if(a=="1")this.labURight.Text="一級(jí)顧客";if(a=="2")this.labURight.Text="二級(jí)顧客";if(a=="3")this.labURight.Text="三級(jí)顧客";if(a=="4")this.labURight.Text="管理員";if(a=="5")this.labURight.Text="超級(jí)管理員";}dr.Close();}privatevoidcboxUName_SelectedIndexChanged(objectsender,EventArgse){}privatevoidLogin_FormClosing(objectsender,F(xiàn)ormClosingEventArgse){Application.Exit();}}}3.1入庫管理界面usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespaceXRX.GoodsManage{publicpartialclassInManage:Form{inta=0,aa=0,bb=0;publicInManage(){InitializeComponent();}privatevoidInManage_Load(objectsender,EventArgse){aaa();}privatevoidaaa(){DataBasedb=newDataBase();DataSetds=db.GetDs(CommandType.StoredProcedure,"up_findStro",null);this.dgvISManage.DataSource=ds.Tables[0];this.cboxSName.DataSource=ds.Tables[0].DefaultView;this.cboxSName.DisplayMember="StorageName";boBox1.DataSource=ds.Tables[0].DefaultView;boBox1.DisplayMember="GoodsName";this.dgvISManage.Columns[0].Visible=false;this.dgvISManage.Columns[1].HeaderText="倉(cāng)庫名";this.dgvISManage.Columns[2].HeaderText="物品名";this.dgvISManage.Columns[3].HeaderText="入庫數(shù)量";this.dgvISManage.Columns[4].HeaderText="入庫單位";this.dgvISManage.Columns[5].HeaderText="入庫日期";this.dgvISManage.Columns[6].HeaderText="備注";this.dgvISManage.Columns[1].Width=100;this.dgvISManage.Columns[2].Width=80;this.dgvISManage.Columns[3].Width=80;this.dgvISManage.Columns[4].Width=80;this.dgvISManage.Columns[5].Width=80;this.dgvISManage.Columns[6].Width=100;this.dgvISManage.ReadOnly=true;//只讀dgvISManage.SelectionMode=DataGridViewSelectionMode.FullRowSelect;//選中行this.dgvISManage.AllowUserToResizeRows=false;this.dgvISManage.AllowUserToResizeColumns=false;//禁止拖動(dòng)this.dgvISManage.DefaultCellStyle.Alignment=DataGridViewContentAlignment.MiddleCenter;//文本居中this.dgvISManage.ColumnHeadersDefaultCellStyle.Alignment=DataGridViewContentAlignment.MiddleCenter;//表頭居中}privatevoiddgvISManage_CellClick(objectsender,DataGridViewCellEventArgse){try{a=Convert.ToInt32(this.dgvISManage.Rows[e.RowIndex].Cells[0].Value.ToString());this.cboxSName.Text=this.dgvISManage.Rows[e.RowIndex].Cells[1].Value.ToString();this.textBox1.Text=this.dgvISManage.Rows[e.RowIndex].Cells[7].Value.ToString();boBox1.Text=this.dgvISManage.Rows[e.RowIndex].Cells[2].Value.ToString();this.txtGSpec.Text=this.dgvISManage.Rows[e.RowIndex].Cells[3].Value.ToString();this.dateTimePicker1.Value=Convert.ToDateTime(this.dgvISManage.Rows[e.RowIndex].Cells[5].Value.ToString());this.txtGIPrice.Text=this.dgvISManage.Rows[e.RowIndex].Cells[4].Value.ToString();this.txtISRemark.Text=this.dgvISManage.Rows[e.RowIndex].Cells[6].Value.ToString();}catch{}}privatevoidbtnAdd_Click(objectsender,EventArgse){DataBasedb=newDataBase();SqlParameter[]Pa=newSqlParameter[6];Pa[0]=db.MakeInParam("@StorageID",SqlDbType.Int,4,aa);Pa[1]=db.MakeInParam("@GoodsID",SqlDbType.Int,4,bb);Pa[2]=db.MakeInParam("@InNum",SqlDbType.Int,4,Convert.ToInt32(this.txtGSpec.Text));Pa[3]=db.MakeInParam("@InUnit",SqlDbType.VarChar,20,this.txtGIPrice.Text);Pa[4]=db.MakeInParam("@InDate",SqlDbType.VarChar,20,this.dateTimePicker1.Value);Pa[5]=db.MakeInParam("@InRemark",SqlDbType.VarChar,20,this.txtISRemark.Text);intb=db.ExecuteNonQuery(CommandType.StoredProcedure,"up_InStore",Pa);intAdd=db.ExecuteNonQuery(CommandType.Text,"insertintoInInfo(StorageID,GoodsID,InNum,InUnit,InDate,InRemark)values('"+aa+"','"+bb+"','"+this.txtGSpec.Text+"','"+this.txtGIPrice+"','"+this.dateTimePicker1.Value+"','"+this.txtISRemark.Text+"')",null);if(Add==1){MessageBox.Show("添加入庫信息成功","添加成功",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);aaa();}else{MessageBox.Show("添加入庫信息失敗","添加失敗",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}}privatevoidcboxSName_SelectedIndexChanged(objectsender,EventArgse){DataBasedb=newDataBase();SqlDataReaderdr=db.ExecuteReader(CommandType.Text,"selectStorageIDfromStorageInfowhereStorageName='"+this.cboxSName.Text+"'",null);if(dr.Read())aa=Convert.ToInt32(dr["StorageID"].ToString());dr.Close();SqlDataReaderdr2=db.ExecuteReader(CommandType.Text,"selectGoodsIDfromGoodsInfowhereGoodsName='"+boBox1.Text+"'",null);if(dr2.Read())bb=Convert.ToInt32(dr2["GoodsID"].ToString());dr2.Close();}privatevoidbtnExit_Click(objectsender,EventArgse){this.Close();}privatevoidbtnDel_Click(objectsender,EventArgse){DataBasedb=newDataBase();intDelete=db.ExecuteNonQuery(CommandType.Text,"deletefromInInfowhereInOrder='"+a+"'",null);if(Delete==1){MessageBox.Show("刪除入庫信息成功","修改成功",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);aaa();}else{MessageBox.Show("刪除入庫信息失敗","修改失敗",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}}}}3.2出庫管理界面usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespaceXRX.GoodsManage{publicpartialclassOutManage:Form{inta=0,aa=0,bb=0;publicOutManage(){InitializeComponent();}privatevoidbtnAdd_Click(objectsender,EventArgse){DataBasedb=newDataBase();SqlParameter[]Pa=newSqlParameter[6];Pa[0]=db.MakeInParam("@StorageID",SqlDbType.Int,4,aa);Pa[1]=db.MakeInParam("@GoodsID",SqlDbType.Int,4,bb);Pa[2]=db.MakeInParam("@OutNum",SqlDbType.Int,4,Convert.ToInt32(this.txtGSpec.Text));Pa[3]=db.MakeInParam("@OutUnit",SqlDbType.VarChar,20,this.txtGIPrice.Text);Pa[4]=db.MakeInParam("@OutDate",SqlDbType.VarChar,20,this.dateTimePicker1.Value);Pa[5]=db.MakeInParam("@OutRemark",SqlDbType.VarChar,20,this.txtISRemark.Text);intb=db.ExecuteNonQuery(CommandType.StoredProcedure,"up_OutStore",Pa);intAdd=db.ExecuteNonQuery(CommandType.Text,"insertintoOutInfo(StorageID,GoodsID,OutNum,OutUnit,OutDate,OutRemark)values('"+aa+"','"+bb+"','"+this.txtGSpec.Text+"','"+this.txtGIPrice+"','"+this.dateTimePicker1.Value+"','"+this.txtISRemark.Text+"')",null);if(Add==1){MessageBox.Show("添加出庫信息成功","添加成功",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);aaa();}else{MessageBox.Show("添加出庫信息失敗","添加失敗",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}}privatevoidbtnDel_Click(objectsender,EventArgse){DataBasedb=newDataBase();intDelete=db.ExecuteNonQuery(CommandType.Text,"deletefromOutInfowhereOutOrder='"+a+"'",null);if(Delete==1){MessageBox.Show("刪除入庫信息成功","修改成功",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);aaa();}else{MessageBox.Show("刪除入庫信息失敗","修改失敗",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}}privatevoidbtnExit_Click(objectsender,EventArgse){this.Close();}privatevoidOutManage_Load(objectsender,EventArgse){aaa();}privatevoidaaa(){DataBasedb=newDataBase();DataSetds=db.GetDs(CommandType.StoredProcedure,"up_findStrob",null);this.dgvISManage.DataSource=ds.Tables[0];this.cboxSName.DataSource=ds.Tables[0].DefaultView;this.cboxSName.DisplayMember="StorageName";boBox1.DataSource=ds.Tables[0].DefaultView;boBox1.DisplayMember="GoodsName";this.dgvISManage.Columns[0].Visible=false;this.dgvISManage.Columns[1].HeaderText="倉(cāng)庫名";this.dgvISManage.Columns[2].HeaderText="物品名";this.dgvISManage.Columns[3].HeaderText="出庫數(shù)量";this.dgvISManage.Columns[4].HeaderText="出庫單位";this.dgvISManage.Columns[5].HeaderText="出庫日期";this.dgvISManage.Columns[6].HeaderText="備注";this.dgvISManage.Columns[1].Width=100;this.dgvISManage.Columns[2].Width=80;this.dgvISManage.Columns[3].Width=80;this.dgvISManage.Columns[4].Width=80;this.dgvISManage.Columns[5].Width=80;this.dgvISManage.Columns[6].Width=100;this.dgvISManage.ReadOnly=true;//只讀dgvISManage.SelectionMode=DataGridViewSelectionMode.FullRowSelect;//選中行this.dgvISManage.AllowUserToResizeRows=false;this.dgvISManage.AllowUserToResizeColumns=false;//禁止拖動(dòng)this.dgvISManage.DefaultCellStyle.Alignment=DataGridViewContentAlignment.MiddleCenter;//文本居中this.dgvISManage.ColumnHeadersDefaultCellStyle.Alignment=DataGridViewContentAlignment.MiddleCenter;//表頭居中}privatevoiddgvISManage_CellClick(objectsender,DataGridViewCellEventArgse){try{a=Convert.ToInt32(this.dgvISManage.Rows[e.RowIndex].Cells[0].Value.ToString());this.cboxSName.Text=this.dgvISManage.Rows[e.RowIndex].Cells[1].Value.ToString();this.textBox1.Text=this.dgvISManage.Rows[e.RowIndex].Cells[7].Value.ToString();boBox1.Text=this.dgvISManage.Rows[e.RowIndex].Cells[2].Value.ToString();this.txtGSpec.Text=this.dgvISManage.Rows[e.RowIndex].Cells[3].Value.ToString();this.dateTimePicker1.Value=Convert.ToDateTime(this.dgvISManage.Rows[e.RowIndex].Cells[5].Value.ToString());this.txtGIPrice.Text=this.dgvISManage.Rows[e.RowIndex].Cells[4].Value.ToString();this.txtISRemark.Text=this.dgvISManage.Rows[e.RowIndex].Cells[6].Value.ToString();}catch{}}privatevoidcboxSName_SelectedIndexChanged(objectsender,EventArgse){DataBasedb=newDataBase();SqlDataReaderdr=db.ExecuteReader(CommandType.Text,"selectStorageIDfromStorageInfowhereStorageName='"+this.cboxSName.Text+"'",null);if(dr.Read())aa=Convert.ToInt32(dr["StorageID"].ToString());dr.Close();SqlDataReaderdr2=db.ExecuteReader(CommandType.Text,"selectGoodsIDfromGoodsInfowhereGoodsName='"+boBox1.Text+"'",null);if(dr2.Read())bb=Convert.ToInt32(dr2["GoodsID"].ToString());dr2.Close();}}}3.3損耗管理界面usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespaceXRX.GoodsManage{publicpartialclassBreakManage:Form{inta=0,aa=0,bb=0;publicBreakManage(){InitializeComponent();}privatevoidbtnAdd_Click(objectsender,EventArgse){DataBasedb=newDataBase();SqlParameter[]Pa=newSqlParameter[6];Pa[0]=db.MakeInParam("@StorageID",SqlDbType.Int,4,aa);Pa[1]=db.MakeInParam("@GoodsID",SqlDbType.Int,4,bb);Pa[2]=db.MakeInParam("@BreakNum",SqlDbType.Int,4,Convert.ToInt32(this.txtGSpec.Text));Pa[3]=db.MakeInParam("@BreakDate",SqlDbType.VarChar,20,this.dateTimePicker1.Value);Pa[4]=db.MakeInParam("@BreakRemark",SqlDbType.VarChar,20,this.txtISRemark.Text);intb=db.ExecuteNonQuery(CommandType.StoredProcedure,"up_BreakStore",Pa);intAdd=db.ExecuteNonQuery(CommandType.Text,"insertintoBreakInfo(StorageID,GoodsID,BreakNum,BreakDate,BreakRemark)values('"+aa+"','"+bb+"','"+this.txtGSpec.Text+"','"+this.dateTimePicker1.Value+"','"+this.txtISRemark.Text+"')",null);if(Add==1){MessageBox.Show("添加損耗信息成功","添加成功",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);aaa();}else{MessageBox.Show("添加損耗信息失敗","添加失敗",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}}privatevoidbtnDel_Click(objectsender,EventArgse){DataBasedb=newDataBase();intDelete=db.ExecuteNonQuery(CommandType.Text,"deletefromBreakInfowhereBreakOrder='"+a+"'",null);if(Delete==1){MessageBox.Show("刪除入庫信息成功","修改成功",Messa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論