




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、.課 程 設(shè) 計(jì) 課程名稱_數(shù)據(jù)庫_題目名稱_超市數(shù)據(jù)庫管理系統(tǒng)_學(xué)生學(xué)院_計(jì)算機(jī)學(xué)院_專業(yè)班級(jí)_學(xué) 號(hào)_ _學(xué)生姓名_ _指導(dǎo)教師_左亞堯老師_ 2013年 1月 16日目錄一、相關(guān)技術(shù)介紹1二、需求分析1三、概念結(jié)構(gòu)設(shè)計(jì)4四、邏輯結(jié)構(gòu)設(shè)計(jì)5五、數(shù)據(jù)庫實(shí)施5六、使用說明25七、收獲與體會(huì)35:一、 相關(guān)技術(shù)介紹RDBMS:SQL Server 2008SQL Server 2008提供了公司可依靠的技術(shù)和能力來接受不斷發(fā)展的對(duì)于管理數(shù)據(jù)和給用戶發(fā)送全面的洞察的挑戰(zhàn)。具有在關(guān)鍵領(lǐng)域方面的顯著的優(yōu)勢(shì),SQL Server 2008是一個(gè)可信任的、高效的、智能的數(shù)據(jù)平臺(tái)。SQL Server 20
2、08是微軟數(shù)據(jù)平臺(tái)愿景中的一個(gè)主要部分,旨在滿足目前和將來管理和使用數(shù)據(jù)的需求。應(yīng)用開發(fā)環(huán)境和工具:Visual Basic 6.0Visual Basic是一種由微軟公司開發(fā)的包含協(xié)助開發(fā)環(huán)境的事件驅(qū)動(dòng)編程語言。從任何標(biāo)準(zhǔn)來說,VB都是世界上使用人數(shù)最多的語言不僅是盛贊VB的開發(fā)者還是抱怨VB的開發(fā)者的數(shù)量。它源自于BASIC編程語言。VB擁有圖形用戶界面(GUI)和快速應(yīng)用程序開發(fā)(RAD)系統(tǒng),可以輕易的使用DAO、RDO、ADO連接數(shù)據(jù)庫,或者輕松的創(chuàng)建ActiveX控件。程序員可以輕松的使用VB提供的組件快速建立一個(gè)應(yīng)用程序二、 需求分析本次選題的題目是超市數(shù)據(jù)庫管理系統(tǒng),針對(duì)的是日
3、常生活中離不開大家的超級(jí)市場(chǎng)。要完成超市數(shù)據(jù)庫管理系統(tǒng),就要對(duì)超市的架構(gòu)體系以及運(yùn)營(yíng)流程做一個(gè)較為充分的了解。作為一個(gè)商業(yè)運(yùn)營(yíng)系統(tǒng),超市系統(tǒng)始終離不開人員管理、物資管理以及財(cái)務(wù)管理,由于財(cái)務(wù)管理比較簡(jiǎn)單,所以這次超市系統(tǒng)主要以人員和物資為中心,圍繞著這兩點(diǎn)展開設(shè)計(jì)。本次對(duì)人員和物資的設(shè)計(jì)方面部分地方做了簡(jiǎn)化處理,基本不影響數(shù)據(jù)庫的運(yùn)行。以下是本次數(shù)據(jù)庫系統(tǒng)的數(shù)據(jù)字典:數(shù)據(jù)結(jié)構(gòu)名數(shù)據(jù)結(jié)構(gòu)含義說明數(shù)據(jù)項(xiàng)名數(shù)據(jù)項(xiàng)含義說明數(shù)據(jù)類型長(zhǎng)度取值范圍與其他數(shù)據(jù)項(xiàng)的邏輯關(guān)系數(shù)據(jù)項(xiàng)之間的關(guān)系員工超市員工基本信息,倉庫管理員和店面員工的超類員工號(hào)區(qū)分每個(gè)員工的編號(hào)char4員工的主碼姓名員工姓名char8性別員工性
4、別char2男,女年齡員工年齡smallint部門名員工所在部門char10人事部, 銷售部, 后勤部職務(wù)員工的職務(wù)char10員工,主管工齡員工在超市工作的時(shí)間(年)smallint主管工號(hào)員工所在部門的主管的編號(hào)char4員工號(hào)員工號(hào)的子集員工號(hào)的子集倉庫超市倉庫基本信息倉庫號(hào)每個(gè)倉庫的編號(hào)char4倉庫的主碼倉庫面積倉庫面積smallint倉庫管理員后勤部的員工,員工的子類,負(fù)責(zé)管理商品入貨和存儲(chǔ)情況工號(hào)后勤部員工的編號(hào)char4員工.員工號(hào)的子集主碼,員工的外碼倉庫號(hào)每個(gè)倉庫的編號(hào)char4倉庫.倉庫號(hào)的子集倉庫的外碼店面超市店面基本信息商品種類超市所賣的商品種類char20店面的主碼
5、所在區(qū)域商品所在的超市的某區(qū)域char10店面員工銷售部的員工,負(fù)責(zé)管理超市里的商品以及商品出售情況工號(hào)銷售部員工的編號(hào)char4員工.員工號(hào)的子集主碼,員工的外碼商品種類銷售部員工所負(fù)責(zé)超市里面的某類商品種類char20店面.商品種類的子集店面的外碼商品超市系統(tǒng)中所涉及的物品,超市運(yùn)行的關(guān)鍵物品條形碼商品的條形碼,是每件商品的唯一標(biāo)示char20商品的主碼名稱商品的名稱char20品牌商品的品牌char20規(guī)格同種商品的各種尺寸char10單價(jià)商品出售的單價(jià)float賣出商品賣出的數(shù)量smallint倉庫號(hào)商品存放的倉庫號(hào)char4倉庫.倉庫號(hào)的子集倉庫的外碼庫存商品剩余的數(shù)量smallin
6、t商品種類商品所屬的一種種類char20店面.商品種類的子集店面的外碼供應(yīng)商為超市供應(yīng)商品的商家商家名供應(yīng)商的名稱char20供應(yīng)商的主碼經(jīng)營(yíng)范圍供應(yīng)商銷售的商品范圍char20聯(lián)系電話供應(yīng)商的電話char15貨單供應(yīng)商供應(yīng)給超市的商品貨單貨單號(hào)每張貨單的編號(hào)char20貨單的主碼之一條形碼每張貨單的商品條形碼char20貨單的主碼之一商家名貨單對(duì)應(yīng)的商家char20供應(yīng)商的外碼數(shù)量商品的數(shù)量smallint進(jìn)貨單價(jià)商品的進(jìn)貨價(jià)float出貨單顧客在超市消費(fèi)的單據(jù)貨單號(hào)出貨單的編號(hào)char20主碼數(shù)量商品的數(shù)量smallint條形碼商品的條形碼,是每件商品的唯一標(biāo)示char20商品的外碼以下是
7、本次數(shù)據(jù)庫系統(tǒng)的功能需求:三、 概念結(jié)構(gòu)設(shè)計(jì)以下為本次超市數(shù)據(jù)庫系統(tǒng)的E-R圖:四、 邏輯結(jié)構(gòu)設(shè)計(jì)以下為本數(shù)據(jù)庫的關(guān)系模式:?jiǎn)T工(員工號(hào),姓名,性別,年齡,部門名,職務(wù),工齡,主管工號(hào))倉庫(倉庫號(hào),倉庫面積)店面(商品種類,所在區(qū)域)倉庫管理員(工號(hào),倉庫號(hào))店面員工(工號(hào),商品種類)商品(條形碼,名稱,品牌,規(guī)格,單價(jià),賣出,倉庫號(hào),庫存,商品種類)供應(yīng)商(商家名,經(jīng)營(yíng)范圍,聯(lián)系電話)貨單(貨單號(hào),條形碼,商家名,數(shù)量,進(jìn)貨單價(jià))出貨單(貨單號(hào),條形碼,數(shù)量)達(dá)到3NF五、 數(shù)據(jù)庫實(shí)施以下為創(chuàng)建數(shù)據(jù)庫的所有代碼:USE master;gocreate database smarketon(
8、name='SDBS',filename='e:學(xué)習(xí)大三數(shù)據(jù)庫課程設(shè)計(jì)DBSDBS.mdf',size=50,filegrowth=15%)log on(name='SDBS_log',filename='e:學(xué)習(xí)大三數(shù)據(jù)庫課程設(shè)計(jì)DBSDBS_log.ldf',size=6,filegrowth=2)use smarket;gocreate table 員工(員工號(hào) char(4),姓名 char(8) not null,性別 char(2),年齡 smallint,部門名 char(10) not null,職務(wù) char(1
9、0),工齡 smallint,主管工號(hào) char(4),primary key(員工號(hào)),foreign key(主管工號(hào))references 員工)use smarket;gocreate table 倉庫(倉庫號(hào) char(4) primary key,倉庫面積 smallint)create table 店面(商品種類 char(20) primary key,所在區(qū)域 char(10)use smarket;gocreate table 倉庫管理員(工號(hào) char(4) primary key,倉庫號(hào) char(4),foreign key(倉庫號(hào))references 倉庫 on
10、update cascade,foreign key(工號(hào))references 員工 on delete cascade on update cascade)create table 店面員工(工號(hào) char(4) primary key,商品種類 char(20),foreign key(商品種類)references 店面 on update cascade,foreign key(工號(hào))references 員工 on delete cascade on update cascade)use smarket;gocreate table 商品(條形碼 char(20) primary
11、key,名稱 char(20)not null,品牌 char(20)not null,規(guī)格 char(10)not null,單價(jià) float not null,賣出 smallint not null,倉庫號(hào) char(4),庫存 smallint not null,商品種類 char(20),foreign key(倉庫號(hào))references 倉庫,foreign key(商品種類)references 店面)create table 供應(yīng)商(商家名 char(20)primary key,經(jīng)營(yíng)范圍 char(20),聯(lián)系電話 char(15)use smarket;gocreate
12、table 貨單(貨單號(hào) char(20),條形碼 char(20),商家名 char(20) not null,數(shù)量 smallint not null,進(jìn)貨單價(jià) float not null,primary key(貨單號(hào),條形碼),foreign key(條形碼) references 商品on delete cascade on update cascade,foreign key(商家名) references 供應(yīng)商on delete cascade on update cascade)create table 出貨單(貨單號(hào) char(20)primary key,數(shù)量 smal
13、lint條形碼 char(20),foreign key(條形碼) references 商品on delete cascade on update cascade)以下為圖形界面上的所有代碼:Form1:Private Sub Label2_Click()If Text1.Text = "333333" ThenForm1.HideForm2.ShowUnload MeElseLabel3.Visible = TrueEnd IfEnd SubPrivate Sub Label4_Click()EndEnd SubForm2:Private Sub Command1_Cl
14、ick(Index As Integer)Form3.ShowUnload MeEnd SubPrivate Sub Command19_Click()Form110.ShowUnload MeEnd SubPrivate Sub Command20_Click()Form320.ShowUnload MeEnd SubPrivate Sub Command2_Click()Form4.ShowUnload MeEnd SubPrivate Sub Command21_Click()Form321.ShowUnload MeEnd SubPrivate Sub Command22_Click(
15、)Form322.ShowUnload MeEnd SubPrivate Sub Command23_Click()Form323.ShowUnload MeEnd SubPrivate Sub Command24_Click()Form401.ShowUnload MeEnd SubPrivate Sub Command27_Click()Form11.ShowUnload MeEnd SubPrivate Sub Command3_Click()Form5.ShowUnload MeEnd SubPrivate Sub Command32_Click()Form402.ShowUnload
16、 MeEnd SubPrivate Sub Command34_Click()Form403.ShowUnload MeEnd SubPrivate Sub Command4_Click()Form6.ShowUnload MeEnd SubPrivate Sub Command6_Click()Form8.ShowUnload MeEnd SubPrivate Sub command5_click()Form7.ShowUnload MeEnd SubPrivate Sub Command7_Click()Form12.ShowUnload MeEnd SubPrivate Sub Comm
17、and8_Click()Form404.ShowUnload MeEnd SubPrivate Sub Label4_Click()Form1.ShowUnload MeEnd SubPrivate Sub command25_click()Form9.ShowUnload MeEnd SubForm3:Private Sub Command1_Click()Text1.SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF = F
18、alse ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Label1_Click()Form3.HideForm2.ShowUnload MeEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubPrivate Sub text3_keypress(keyas
19、cii As Integer)Text3.SetFocusEnd SubPrivate Sub text4_keypress(keyascii As Integer)Text4.SetFocusEnd SubPrivate Sub text5_keypress(keyascii As Integer)Text5.SetFocusEnd SubPrivate Sub text6_keypress(keyascii As Integer)Text6.SetFocusEnd SubPrivate Sub text7_keypress(keyascii As Integer)Text7.SetFocu
20、sEnd SubPrivate Sub text8_keypress(keyascii As Integer)Text8.SetFocusEnd SubForm4:Private Sub Command1_Click()Text1.SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubP
21、rivate Sub Label1_Click()Form4.HideForm2.ShowUnload MeEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubForm5:Private Sub Command1_Click()Text1.SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd Sub
22、Private Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Label1_Click()Form5.HideForm2.ShowUnload MeEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Tex
23、t2.SetFocusEnd SubForm6:Private Sub Label1_Click()Form6.HideForm2.ShowUnload MeEnd SubPrivate Sub Command1_Click()Text1.SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd
24、SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubForm7:Private Sub Label1_Click()Form7.HideForm2.ShowUnload MeEnd SubPrivate Sub Command1_Click()Text1.SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd
25、 SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubForm8:Private Sub Command1_Click()Text1.
26、SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Label1_Click()Form8.HideForm2.ShowUnload MeEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.Se
27、tFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubPrivate Sub text3_keypress(keyascii As Integer)Text3.SetFocusEnd SubPrivate Sub text4_keypress(keyascii As Integer)Text4.SetFocusEnd SubPrivate Sub text5_keypress(keyascii As Integer)Text5.SetFocusEnd SubPrivate Sub tex
28、t6_keypress(keyascii As Integer)Text6.SetFocusEnd SubPrivate Sub text7_keypress(keyascii As Integer)Text7.SetFocusEnd SubPrivate Sub text8_keypress(keyascii As Integer)Text8.SetFocusEnd SubForm9:Private Sub Command1_Click()Text1.SetFocusAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate
29、Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Label1_Click()Form9.HideForm2.ShowUnload MeEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFo
30、cusEnd SubPrivate Sub text3_keypress(keyascii As Integer)Text3.SetFocusEnd SubForm11:Private Sub Command1_Click()On Error GoTo a1Text1.SetFocusAdodc2.RecordSource = "update 商品 set 庫存=庫存+" & Val(Text4.Text) & " from 商品 join 貨單 on(商品.條形碼=貨單.條形碼)where 商品.條形碼='" & Tri
31、m(Text2.Text) & "'"Adodc2.Refresha1: DataGrid1.RefreshAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate Sub Command3_Click()Adodc2.RecordSource = "select 條形碼,名稱,賣出,庫存 from 商品"Adodc2.RefreshDataGrid1.RefreshEnd SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF
32、 = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Label1_Click()Form11.HideForm2.ShowEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubPrivate Sub text3_keypress(keyascii
33、As Integer)Text3.SetFocusEnd SubPrivate Sub text4_keypress(keyascii As Integer)Text4.SetFocusEnd SubPrivate Sub text5_keypress(keyascii As Integer)Text5.SetFocusEnd SubForm12:Private Sub Command1_Click()On Error GoTo a1Text1.SetFocusAdodc2.RecordSource = "update 商品 set 賣出=賣出+" & Val(Te
34、xt3.Text) & " ,庫存=庫存-" & Val(Text3.Text) & " from 商品 where 商品.條形碼='" & Trim(Text2.Text) & "'"Adodc2.Refresha1: DataGrid1.RefreshAdodc1.Recordset.MoveLastAdodc1.Recordset.AddNewEnd SubPrivate Sub Command3_Click()Adodc2.RecordSource = "sel
35、ect 條形碼,名稱,品牌,規(guī)格,庫存,賣出 from 商品"Adodc2.RefreshDataGrid1.RefreshEnd SubPrivate Sub Form_Load()If Adodc1.Recordset.EOF = False ThenAdodc1.Recordset.MoveLastEnd IfAdodc1.Recordset.AddNewEnd SubPrivate Sub Label1_Click()Form12.HideForm2.ShowEnd SubPrivate Sub Text1_keypress(keyascii As Integer)Text1
36、.SetFocusEnd SubPrivate Sub text2_keypress(keyascii As Integer)Text2.SetFocusEnd SubPrivate Sub text3_keypress(keyascii As Integer)Text3.SetFocusEnd SubForm110:Dim S As String, Tx As StringDim result As IntegerPrivate Sub Command1_Click()If Text1.Text <> "" ThenIf Text2.Text <>
37、 "" ThenAdodc1.RecordSource = "select * from 員工 where 員工號(hào)='" & Trim(Text1.Text) & "'and 姓名='" & Trim(Text2.Text) & "'"Adodc1.RefreshDataGrid1.RefreshElseAdodc1.RecordSource = "select * from 員工 where 員工號(hào)='" & Tr
38、im(Text1.Text) & "'"Adodc1.RefreshDataGrid1.RefreshEnd IfElseIf Text2.Text <> "" ThenAdodc1.RecordSource = "select * from 員工 where 姓名='" & Trim(Text2.Text) & "'"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd IfEnd SubPrivate Sub Command
39、4_Click() Adodc1.Recordset.Update Adodc1.RefreshEnd SubPrivate Sub Label5_Click(Index As Integer)Form110.HideForm2.ShowUnload MeEnd SubForm320:Dim S As String, Tx As StringDim result As IntegerPrivate Sub Command1_Click()If Text1.Text <> "" ThenIf Text2.Text <> "" The
40、nAdodc1.RecordSource = "select * from 員工,倉庫管理員,倉庫 where 倉庫管理員.工號(hào)='" & Trim(Text1.Text) & "'and 倉庫管理員.倉庫號(hào)='" & Trim(Text2.Text) & "' and 倉庫管理員.倉庫號(hào)=倉庫.倉庫號(hào) and 工號(hào)=員工號(hào)"Adodc1.RefreshDataGrid1.RefreshElseAdodc1.RecordSource = "select * fr
41、om 員工,倉庫管理員,倉庫 where 倉庫管理員.工號(hào)='" & Trim(Text1.Text) & "'and 倉庫管理員.倉庫號(hào)=倉庫.倉庫號(hào) and 工號(hào)=員工號(hào)"Adodc1.RefreshDataGrid1.RefreshEnd IfElseIf Text2.Text <> "" ThenAdodc1.RecordSource = "select * from 員工,倉庫管理員,倉庫 where 倉庫管理員.倉庫號(hào)='" & Trim(Text2.T
42、ext) & "' and 倉庫管理員.倉庫號(hào)=倉庫.倉庫號(hào) and 工號(hào)=員工號(hào)"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd IfEnd SubPrivate Sub Command4_Click() Adodc1.Recordset.Update Adodc1.RefreshEnd SubPrivate Sub Label5_Click(Index As Integer)Form320.HideForm2.ShowUnload MeEnd SubForm321:Dim S As String, Tx As Strin
43、gDim result As IntegerPrivate Sub Command1_Click()If Text1.Text <> "" ThenIf Text2.Text <> "" ThenAdodc1.RecordSource = "select * from 員工,店面員工,店面 where 店面員工.工號(hào)='" & Trim(Text1.Text) & "'and 店面.商品種類='" & Trim(Text2.Text) &
44、; "' and 店面.商品種類=店面員工.商品種類 and 工號(hào)=員工號(hào)"Adodc1.RefreshDataGrid1.RefreshElseAdodc1.RecordSource = "select * from 員工,店面員工,店面 where 店面員工.工號(hào)='" & Trim(Text1.Text) & "'and 店面.商品種類=店面員工.商品種類 and 工號(hào)=員工號(hào)"Adodc1.RefreshDataGrid1.RefreshEnd IfElseIf Text2.Text &
45、lt;> "" ThenAdodc1.RecordSource = "select * from 員工,店面員工,店面 where 店面.商品種類='" & Trim(Text2.Text) & "' and 店面.商品種類=店面員工.商品種類 and 工號(hào)=員工號(hào)"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd IfEnd SubPrivate Sub Command4_Click() Adodc1.Recordset.Update Adodc1.Refresh
46、End SubPrivate Sub Label5_Click(Index As Integer)Form321.HideForm2.ShowUnload MeEnd SubForm322:Dim S As String, Tx As StringDim result As IntegerPrivate Sub Command1_Click()If Text1.Text <> "" ThenIf Text2.Text <> "" ThenAdodc1.RecordSource = "select 商品.倉庫號(hào),條形碼,名
47、稱,品牌,規(guī)格,庫存,倉庫面積 from 商品,倉庫 where 商品.條形碼='" & Trim(Text1.Text) & "'and 商品.倉庫號(hào)='" & Trim(Text2.Text) & "' and 商品.倉庫號(hào)=倉庫.倉庫號(hào)"Adodc1.RefreshDataGrid1.RefreshElseAdodc1.RecordSource = "select 商品.倉庫號(hào),條形碼,名稱,品牌,規(guī)格,庫存,倉庫面積 from 商品,倉庫 where 商品.條形碼
48、='" & Trim(Text1.Text) & "'and 商品.倉庫號(hào)=倉庫.倉庫號(hào)"Adodc1.RefreshDataGrid1.RefreshEnd IfElseIf Text2.Text <> "" ThenAdodc1.RecordSource = "select 商品.倉庫號(hào),條形碼,名稱,品牌,規(guī)格,庫存,倉庫面積 from 商品,倉庫 where 商品.倉庫號(hào)='" & Trim(Text2.Text) & "' and
49、 商品.倉庫號(hào)=倉庫.倉庫號(hào)"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd IfEnd SubPrivate Sub Command4_Click() Adodc1.Recordset.Update Adodc1.RefreshEnd SubPrivate Sub Label5_Click(Index As Integer)Form322.HideForm2.ShowUnload MeEnd SubForm323:Dim S As String, Tx As StringDim result As IntegerPrivate Sub Comman
50、d1_Click()If Text1.Text <> "" ThenIf Text2.Text <> "" ThenAdodc1.RecordSource = "select 商品.商品種類,條形碼,名稱,品牌,規(guī)格,單價(jià),賣出,所在區(qū)域 from 商品,店面 where 條形碼='" & Trim(Text1.Text) & "'and 商品.商品種類='" & Trim(Text2.Text) & "' and 店
51、面.商品種類=商品.商品種類"Adodc1.RefreshDataGrid1.RefreshElseAdodc1.RecordSource = "select 商品.商品種類,條形碼,名稱,品牌,規(guī)格,單價(jià),賣出,所在區(qū)域 from 商品,店面 where 條形碼='" & Trim(Text1.Text) & "'and 店面.商品種類=商品.商品種類"Adodc1.RefreshDataGrid1.RefreshEnd IfElseIf Text2.Text <> "" The
52、nAdodc1.RecordSource = "select 商品.商品種類,條形碼,名稱,品牌,規(guī)格,單價(jià),賣出,所在區(qū)域 from 商品,店面 where 商品.商品種類='" & Trim(Text2.Text) & "' and 店面.商品種類=商品.商品種類"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd IfEnd SubPrivate Sub Command4_Click() Adodc1.Recordset.Update Adodc1.RefreshEnd SubPriva
53、te Sub Label5_Click(Index As Integer)Form323.HideForm2.ShowUnload MeEnd SubForm401:Dim S As String, Tx As StringDim result As IntegerPrivate Sub Command1_Click()If Text1.Text <> "" ThenIf Text2.Text <> "" ThenAdodc1.RecordSource = "select * from 商品 where 條形碼='
54、;" & Trim(Text1.Text) & "'and 名稱='" & Trim(Text2.Text) & "'"Adodc1.RefreshDataGrid1.RefreshElseAdodc1.RecordSource = "select * from 商品 where 條形碼='" & Trim(Text1.Text) & "'"Adodc1.RefreshDataGrid1.RefreshEnd IfEl
55、seIf Text2.Text <> "" ThenAdodc1.RecordSource = "select * from 商品 where 名稱='" & Trim(Text2.Text) & "'"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd IfEnd SubPrivate Sub Command4_Click() Adodc1.Recordset.Update Adodc1.RefreshEnd SubPrivate Sub Label5_Cli
56、ck(Index As Integer)Form401.HideForm2.ShowUnload MeEnd SubForm402:Dim S As String, Tx As StringDim result As IntegerPrivate Sub Command1_Click()If Text1.Text <> "" ThenAdodc1.RecordSource = "select * from 供應(yīng)商 where 商家名='" & Trim(Text1.Text) & "'"Adodc1.RefreshDataGrid1.RefreshEnd IfEnd SubPrivate Sub Command4_Click() Adodc1.Recordset.Update Adodc1.RefreshEnd SubPrivate Sub Label5_Click(Index As Integer)Form4
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 主管工作總結(jié)的目標(biāo)達(dá)成計(jì)劃
- 突破瓶頸實(shí)現(xiàn)團(tuán)隊(duì)持續(xù)發(fā)展的方案計(jì)劃
- 2025基于大數(shù)據(jù)的互聯(lián)網(wǎng)居家養(yǎng)老綜合智能服務(wù)
- 優(yōu)化倉庫設(shè)備維修流程的工作計(jì)劃
- 跨境電商平臺(tái)商品質(zhì)量監(jiān)管機(jī)制
- 跨境電商品牌建設(shè)中的法律風(fēng)險(xiǎn)防控
- 高等教育餐廳豪華酒店式的設(shè)計(jì)與體驗(yàn)
- 超市清潔消毒工作的管理與培訓(xùn)體系
- 資金籌措與教育公平的平衡
- 2025年02月山東青島市嶗山區(qū)事業(yè)單位公開招聘22人筆試歷年典型考題(歷年真題考點(diǎn))解題思路附帶答案詳解
- 2024年高考語文復(fù)習(xí):酬和類古代詩歌閱讀 專項(xiàng)練習(xí)題匯編(含答案解析)
- GB/T 36547-2024電化學(xué)儲(chǔ)能電站接入電網(wǎng)技術(shù)規(guī)定
- 醫(yī)療廢物管理?xiàng)l例
- 消防工程常用設(shè)施三維圖解
- 慢性乙型肝炎防治指南(2022年版)解讀
- 搟筋課件教學(xué)課件
- 醫(yī)院工程改造工程施工組織設(shè)計(jì)方案
- 英語人稱代詞和物主代詞練習(xí)題(附答案)
- 計(jì)算機(jī)一級(jí)考試WPS試題及答案
- 《Windows server操作系統(tǒng)》Windows Server 2019全套教學(xué)課件
- 全科醫(yī)生題庫附有答案
評(píng)論
0/150
提交評(píng)論