freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java超市管理系統(tǒng)-在線瀏覽

2025-05-25 06:04本頁(yè)面
  

【正文】 編號(hào),在銷(xiāo)售功能中搜索,查看商品的信息無(wú)誤后,確定是否購(gòu)買(mǎi)。圖43 搜索001號(hào)商品的信息 購(gòu)買(mǎi)商品在確定自已需要的商品后,然后就是購(gòu)買(mǎi)商品,消費(fèi)者可以按“購(gòu)買(mǎi)”鍵進(jìn)行購(gòu)買(mǎi)物品,購(gòu)買(mǎi)一份就單擊一次“購(gòu)買(mǎi)”鍵,購(gòu)買(mǎi)物品的信息顯示在購(gòu)物信息框中,最后單擊“提交”,消費(fèi)者所購(gòu)買(mǎi)的物品就作為一個(gè)賬單號(hào)存儲(chǔ)在數(shù)據(jù)庫(kù)中。此外,本系統(tǒng)是每購(gòu)買(mǎi)一件商品向數(shù)據(jù)庫(kù)提交一次記錄,當(dāng)未點(diǎn)擊提交按鈕之前,若要結(jié)束此窗口進(jìn)程,我們?cè)诖a中嵌入了一段刪除當(dāng)前帳單的數(shù)據(jù)庫(kù)記錄代碼,以達(dá)到?jīng)]有誤提交的操作。 int price=0。 private JPanel sM=new JPanel()。//personty 按鈕 private JTextArea goodsShow=new JTextArea(), searchShow=new JTextArea()。 //滾動(dòng)區(qū)域 設(shè)定內(nèi)容為 商品顯示的文本區(qū) private JTextField numSearch=new JTextField(),showGoods=new JTextField()。 //查詢(xún)按鈕 private JLabel[] goodsInformation={new JLabel(商品編碼,),new JLabel(商品名稱(chēng),), new JLabel(商品價(jià)格,),new JLabel(生產(chǎn)日期,),new JLabel(生產(chǎn)地,) }。 private JLabel allPrice=new JLabel(商品總價(jià):\n ,),label1=new JLabel(商品信息 ,),label2=new JLabel(購(gòu)物信息 ,)。 for(int i=0。i++) { pS[i].setBounds(550+i*110,50,100,22)。 pS[i].addActionListener(this)。 (true) (100,50,150,22)。 (this)。 (this)。 for (int b=0。b++ ) { goodsInformation[b].setBounds(100+160*b,87,160,30)。 } for (int b=0。b++ ) { goodsI[b].setBounds(100+160*b,150,160,30)。 } (100,690,100,22)。 (690,690,100,22)。 (800,690,100,22)。 (900,480,100,50)。 (20,180,80,22)。 (label2)。 (print)。 (showGoods)。 (numSearch)。 (buyGoods)。 addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { Connection con。 ResultSet rs。 con=(jdbc:odbc:q,)。 rs=(SELECT MAX(編號(hào)) from information)。} for (int i=0。i++ ) { (delete from information where 編號(hào)=+(a1i))。 ap=0。name=null。time=null。n3=0。 } } catch (SQLException g) {(g)。 } })。 (銷(xiāo)售窗口)。 (0,0,1024,768)。 validate()。 sql=()。+n2+39。+num+39。 rs=(SELECT * FROM information where listnum=+n2)。//記錄購(gòu)買(mǎi)商品個(gè)數(shù) ()。 } else {(this,請(qǐng)選擇商品,提示,)。//總價(jià) (商品總價(jià):\n+ap)。 } } if(()==ok) { try { if (n3!=0) { con=(jdbc:odbc:q,)。 (insert into information(listnum,allprice) values(39。,39。))。 ()。 num=null。price=0。add=null。 (null)。//帳單號(hào) } else {(this,請(qǐng)購(gòu)買(mǎi)商品,提示,)。 } } if(()==print) { try { if (n3!=0) { con=(jdbc:odbc:q,)。 (insert into information(listnum,allprice) values(39。,39。))。 ()。 num=null。price=0。add=null。 (null)。//帳單號(hào) } else {(this,請(qǐng)購(gòu)買(mǎi)商品,提示,)。 } } if(()==clean) { try { if (n3!=0) { int a1=0。 sql=()。 while(()) { a1=(1)。in3 。 } ()。 num=null。price=0。add=null。 (null)。} }⑶ 搜索商品的代碼實(shí)現(xiàn)if (()==searchGoods) { num=()。 } catch (ClassNotFoundException f) {(+f)。 sql=()。+num+39。 while(()){ name=(2)。 time=(4)。 n1=1。} catch (SQLException g) {(g)。 n1=0。 num=null。price=0。add=null。 }}⑷ 提交商品的代碼if(()==ok) { try { if (n3!=0) { con=(jdbc:odbc:q,)。 (insert into information(listnum,allprice) values(39。,39。))。 ()。 num=null。price=0。add=null。 (null)。//帳單號(hào)} else {(this,請(qǐng)購(gòu)買(mǎi)商品,提示,)。} 用戶(hù)管理功能介紹在用戶(hù)管理部分,主要功能是控制小超市內(nèi)用戶(hù)的權(quán)限,不同的職位具有不同的權(quán)限,具有不同的ID和密碼。界面的設(shè)計(jì)簡(jiǎn)單明了,將setLayout布局設(shè)為空,然后再向面板上添加組件,通過(guò)坐標(biāo)值控制各組件的位置。圖45 用戶(hù)管理界面 添加用戶(hù)功能介紹在添加用戶(hù)行所對(duì)應(yīng)的文本框中輸入要添加用戶(hù)的ID、PASSWORD、PERSONTY,單擊添加按鈕,“添加”按鈕上已添加了監(jiān)控器,在按鈕被觸發(fā)后,將會(huì)向“ID”、“PASSWORD”、“PERSONTY”所對(duì)應(yīng)的文本框索取數(shù)據(jù),只有當(dāng)該用戶(hù)在數(shù)據(jù)庫(kù)中沒(méi)有相應(yīng)記錄,并且添加的信息完整時(shí)才會(huì)顯示添加成功,若所添加的信息不完整,則顯示“請(qǐng)輸入完整信息”,若信息完整,但該用戶(hù)已存在,則顯示“添加失??!原因:可能數(shù)據(jù)庫(kù)添加失敗或已有此ID”。 (a) (b)圖46 添加用戶(hù) 修改用戶(hù)功能介紹修改部分的操作方法與添加部分相類(lèi)似,但是輸入的是修改后的用戶(hù)信息,“修改”按鈕也添加了監(jiān)控器,單擊“修改”按鈕后,會(huì)將新輸入的“ID”、“PASSWORD”、“PERSONTY”信息返回到數(shù)據(jù)庫(kù)中,替代原來(lái)的信息。 修改用戶(hù) 刪除用戶(hù)功能介紹刪除用戶(hù)部分的操作,只需要輸入用戶(hù)的ID,然后點(diǎn)擊“刪除”按鈕,由于刪除按鈕上也添加了監(jiān)控器,當(dāng)按鈕被觸發(fā)后,會(huì)從刪除用戶(hù)對(duì)應(yīng)的文本框獲取數(shù)據(jù)(即ID號(hào)碼),再返回?cái)?shù)據(jù)庫(kù),將該ID對(duì)應(yīng)的信息刪除。 (a) (b)圖48 刪除用戶(hù) 顯示用戶(hù)信息與刷新按鈕介紹設(shè)置顯示用戶(hù)信息區(qū)域的主要目的是將數(shù)據(jù)庫(kù)中的用戶(hù)信息顯示出來(lái),然而該區(qū)域只能顯示在進(jìn)入系統(tǒng)時(shí)的數(shù)據(jù)庫(kù)信息,對(duì)于之后的修改等操作后的信息無(wú)法更新,所以添加了“刷新”按鈕,使心事的信息更新,刷新的實(shí)質(zhì)是將該界面關(guān)閉再重新打開(kāi),從而達(dá)到更新數(shù)據(jù)的目的。import .*。import .*。import .*。DBQ=D:\\。 private JLabel idl1=new JLabel(ID,),idl2=new JLabel(ID,),idl3=new JLabel(ID,),passwordl1=new JLabel(PASSWORD,),passwordl2=new JLabel(PASSWORD,),perl1=new JLabel(PERSONTY,),perl2=new JLabel(PERSONTY,)。 private JTextField id1=new JTextField(),id2=new JTextField(),id3=new JTextField(),password1=new JTextField(),password2=new JTextField()。 private JButton[] cB={new JButton(添加),new JButton(修改),new JButton(刪除)}。 private String[] str={無(wú),管理員,超級(jí)用戶(hù),用戶(hù)}。 private JTextArea jtas=new JTextArea()。 private JButton reShow=new JButton(刷新)。//連接對(duì)象 ResultSet rs。 View3() { (null)。i4。 (pS[i])。 } for (int i=0。i++ ) {cho[i].setBounds(50,120+i*51,140,22)。 } for (int i=0。i++ ) {cB[i].setBounds(680,120+i*51,80,22)。 cB[i].addActionListener(this)。(370,98,150,22)。 (200,120,150,22)。(540,120,100,22)。(370,149,150,22)。 (200,171,150,22)。(540,171,100,22)。 (200,222,150,22)。 (this)。 Statement sql。 con=(url)。 rs=(SELECT * from password)。 String a2=(2)。 ( 帳號(hào):+a1+ 密碼:+a2+ 權(quán)限:+a3+\n)。 } catch (SQLException g) {(g)。 (reShow)。 (per1)。 (perl1)。 (idl1)。 (idl2)。 (idl3)。 (passwordl1)。 (passwordl2)。 addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { (0)。 (v3)。 (false)。 (true)。 }//連接數(shù)據(jù)庫(kù)public void conDB() { String url = jdbc:odbc:driver={Microsoft Access Driver (*.mdb)}。try {()。}try { con = (url)。} catch (SQLException e) {(null, 數(shù)據(jù)庫(kù)連接失敗!)。()。}}public void actionPerformed(ActionEvent e) {if(
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1