




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、超市信息管理系統(tǒng)代碼?using System; using System。Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System。Text; using System.Windows.Forms; namespace ?????? public partial class f_????? : Form /????????? public string strOldNO = ; public string strOldName = ; publ
2、ic string strOldAdd = ”; public f_???() InitializeComponent(); private void f_?????_Load(object sender, EventArgs e) / TODO: ???? ????? ?????????DataSet。??????, ?????????,? this.??TableAdapter.Fill(this。???????????DataSet.???); /???????? private void btnInsert_Click(object sender, EventArgs e) /? ??
3、?? string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO。Text; int iNO = 0; int iErrCode = 0; /? ??? ? ?? ? try iNO = Convert.ToInt32(txtNO。Text。Trim(); catch (Exception eINO) iErrCode = 1; /?????? ? ? ? if (strName。Length 20) iErrCode = 2; if (strAdd。Length 30) iErrCode =
4、 3; if (iErrCode != 0) MessageBox.Show(”? ??,????? ?,?); else try /?????,???? this。??TableAdapter.Insert(iNO, strName, strAdd); catch (Exception exInsert) MessageBox.Show(”???????????????????”); /?????? this。???TableAdapter.Fill(this。?????????DataSet。??); /?????? ???? private void dataGridView1_Cell
5、Click(object sender, DataGridViewCellEventArgs e) /? ???? ?? ? string strNO = this。dataGridView1。Rowse。RowIndex。Cells0。Value。ToString(); string strName = this。dataGridView1。Rowse。RowIndex.Cells1。Value.ToString(); string strAdd = this.dataGridView1。Rowse.RowIndex。Cells2.Value。ToString(); /???? txtNO。
6、Text = strNO; txtName。Text = strName; txtAdd.Text = strAdd; /?????? strOldNO = strNO; strOldName = strName; strOldAdd = strAdd; / ?,??? private void btnDelete_Click(object sender, EventArgs e) /?? ????? string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO。Text; int iNO =
7、0; int iErrCode = 0; /? ????? ? ? ? try iNO = Convert.ToInt32(txtNO.Text.Trim()); catch (Exception eINO) iErrCode = 1; /?? ????? ?? ?? ? if (strName。Length 20) iErrCode = 2; if (strAdd.Length 30) iErrCode = 3; if (iErrCode != 0) MessageBox.Show(? ???,??? ?,?”); else try /??,?? this。?TableAdapter.Del
8、ete(iNO, strName, strAdd); catch (Exception exInsert) MessageBox。Show( ?,??????????????????); /??????? this。??TableAdapter。Fill(this.???????DataSet。??); /???? private void btnUpdate_Click(object sender, EventArgs e) /? ???? string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = t
9、xtNO.Text; int iNO = 0; int iErrCode = 0; /?? ???? ?? ?? ? try iNO = Convert。ToInt32(txtNO。Text.Trim()); catch (Exception eINO) iErrCode = 1; /? ? ??? ?? ?? ? if (strName.Length 20) iErrCode = 2; if (strAdd。Length 30) iErrCode = 3; if (iErrCode != 0) MessageBox。Show(”? ???,??????? ?,?); else try this。??TableAdapter。Update(iNO, strName, strAdd, Convert。ToInt32(strOldNO), strOl
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度自然人創(chuàng)業(yè)貸款合同生效流程與支持政策
- 二零二五年度新能源企業(yè)員工正式入職研發(fā)合同
- 2025年度網(wǎng)絡(luò)安全設(shè)備研發(fā)人員聘用合同
- 2025年度校園安全責(zé)任與家長(zhǎng)協(xié)同保障合同
- 2025年度綠色建筑企業(yè)合作成立協(xié)議書
- 二零二五年度學(xué)生公寓房東租賃合同及宿舍設(shè)施維護(hù)協(xié)議
- 門窗吊裝知識(shí)培訓(xùn)課件
- 2025陜西北元化工集團(tuán)股份有限公司招聘(50人)筆試參考題庫(kù)附帶答案詳解
- 2025湖北日?qǐng)?bào)傳媒集團(tuán)招聘45人筆試參考題庫(kù)附帶答案詳解
- 江西省南昌市2025屆高三模擬測(cè)試(一模)語(yǔ)文試卷(解析版)
- 2025年哈爾濱幼兒師范高等??茖W(xué)校單招職業(yè)技能測(cè)試題庫(kù)學(xué)生專用
- 企業(yè)內(nèi)部系統(tǒng)使用權(quán)限規(guī)范
- 2024年亳州職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫(kù)
- 2025年旅行與旅游的未來(lái):擁抱可持續(xù)與包容性增長(zhǎng)報(bào)告(英文版)-世界經(jīng)濟(jì)論壇
- 2025年湖南水利水電職業(yè)技術(shù)學(xué)院高職單招職業(yè)適應(yīng)性測(cè)試近5年??及鎱⒖碱}庫(kù)含答案解析
- 2025年徐州生物工程職業(yè)技術(shù)學(xué)院高職單招職業(yè)技能測(cè)試近5年??及鎱⒖碱}庫(kù)含答案解析
- 向量的數(shù)量積說(shuō)課
- 2024年全國(guó)體育專業(yè)單獨(dú)招生考試數(shù)學(xué)試卷試題真題(含答案)
- 2025年中糧集團(tuán)有限公司招聘筆試參考題庫(kù)含答案解析
- 《裝修流程圖課件》課件
- 2023年12月大學(xué)英語(yǔ)四級(jí)第一套真題和答案
評(píng)論
0/150
提交評(píng)論