![C#與.NET 4.0數(shù)據(jù)庫開發(fā)課程設(shè)計ATM 交易管理系統(tǒng)_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/10/fd484621-f26f-4627-80f6-d225147617cf/fd484621-f26f-4627-80f6-d225147617cf1.gif)
![C#與.NET 4.0數(shù)據(jù)庫開發(fā)課程設(shè)計ATM 交易管理系統(tǒng)_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/10/fd484621-f26f-4627-80f6-d225147617cf/fd484621-f26f-4627-80f6-d225147617cf2.gif)
![C#與.NET 4.0數(shù)據(jù)庫開發(fā)課程設(shè)計ATM 交易管理系統(tǒng)_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/10/fd484621-f26f-4627-80f6-d225147617cf/fd484621-f26f-4627-80f6-d225147617cf3.gif)
![C#與.NET 4.0數(shù)據(jù)庫開發(fā)課程設(shè)計ATM 交易管理系統(tǒng)_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/10/fd484621-f26f-4627-80f6-d225147617cf/fd484621-f26f-4627-80f6-d225147617cf4.gif)
![C#與.NET 4.0數(shù)據(jù)庫開發(fā)課程設(shè)計ATM 交易管理系統(tǒng)_第5頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/10/fd484621-f26f-4627-80f6-d225147617cf/fd484621-f26f-4627-80f6-d225147617cf5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、課程設(shè)計報告課程名稱: c#與.net 4.0數(shù)據(jù)庫開發(fā) 設(shè)計題目: atm 交易管理系統(tǒng) 系 別: 信息科學(xué)系 專 業(yè): 計算機(jī)科學(xué)與技術(shù) 學(xué) 號: 姓 名: 指導(dǎo)教師: 時 間:2011 2012 學(xué)年第 一 學(xué)期南京人口學(xué)院信息科學(xué)系課程設(shè)計題目 atm交易管理系統(tǒng)課程設(shè)計目的及要求:課程設(shè)計目的(1)通過本次設(shè)計掌握使用c#語言中窗體的建立,各個控件的使用,以及界面的設(shè)計(2)進(jìn)一步鞏固所學(xué)的c#及數(shù)據(jù)庫的相關(guān)理論知識,提高分析和解決實際問題的能力(3)初步掌握使用c#工具設(shè)計一個具體實例的方法,包括軟件的設(shè)計,調(diào)試的全過程1.1系統(tǒng)的用戶需求描述 隨著計算機(jī)技術(shù)的發(fā)展,atm越來越多
2、的出現(xiàn)在人們的日常生活中,在atm機(jī)上進(jìn)行存、取款等業(yè)務(wù)可以大大減少銀行工作人員的工作,提高銀行效率,而且可以節(jié)省人們排隊等候時間。所以atm系統(tǒng)的開發(fā)可以很好的方便人們的生活。 通過atm機(jī),用戶可以進(jìn)行一些基本的功能實現(xiàn),例如:存款、取款、查詢余額、轉(zhuǎn)賬、修改賬戶密碼等等。系統(tǒng)的總體功能如下圖atm系統(tǒng)用戶功能用戶注冊功能用戶注銷注銷功能注冊信息存 款查詢余額轉(zhuǎn) 賬取 款圖1.2-1 atm系統(tǒng)總體功能 2.1.1 課設(shè)任務(wù)(1)根據(jù)技術(shù)要求和現(xiàn)有開發(fā)環(huán)境,分析題目(2)選定設(shè)計方案(3)畫出軟件框架結(jié)構(gòu)圖,關(guān)鍵程序流程圖(4)使用c#語言和.net框架,并結(jié)合數(shù)據(jù)庫,實現(xiàn)軟件(5)調(diào)試,
3、修改并完善程序2.1.2 課設(shè)要求(1)atm的運行界面,注冊帳號(920(2)輸入正確密碼登入系統(tǒng)(3)實現(xiàn)存款、取款、余額查詢等操作(4)實現(xiàn)注銷賬戶功能2.2系統(tǒng)的設(shè)計通過本系統(tǒng)可以達(dá)到以下目標(biāo):(1)功能方面:取款、查詢余額、轉(zhuǎn)賬、存款、(2)性能:可使用戶在無任何經(jīng)驗的情況下進(jìn)行操作atm自助式服務(wù)(3)輸入:用戶通過鍵盤進(jìn)行輸入2.2.1 數(shù)據(jù)庫的分析與設(shè)計 本次數(shù)據(jù)庫是利用access建立,共包含兩張表存取款表,用戶個人信息表。具體如下: (1)存取款表(2)用戶個人信息表2.2.2邏輯層次的設(shè)計本次課設(shè)的自動提款機(jī)模擬軟件系統(tǒng)可以使用戶進(jìn)行登錄、取款、轉(zhuǎn)賬、查詢余額、修改密碼、
4、記錄查詢和交費等基本業(yè)務(wù)。atm系統(tǒng)基本結(jié)構(gòu)框圖如圖2.2.3程序設(shè)計用戶進(jìn)入系統(tǒng)后,點擊用戶登錄進(jìn)入登陸界面,在登錄窗口中輸入卡號和密碼,判斷卡號與密碼是否正確,若卡號與密碼正確則進(jìn)入用戶操作界面,并根據(jù)用戶的相關(guān)操作給用戶提供相應(yīng)的服務(wù)。若卡號與密碼不正確,彈出對話框提示用戶確認(rèn)卡號和密碼錯誤后重新輸入,若輸入密碼錯誤次數(shù)大于3次,則鎖定該帳號。2.2.4 程序流程圖軟件設(shè)計程序流程圖如圖所示:2.3界面的設(shè)計及功能的實現(xiàn)根據(jù)個人業(yè)務(wù)界面所提供的按鈕,用戶可以進(jìn)行取款,查詢余額,轉(zhuǎn)賬,等操作,個人業(yè)務(wù)界面如圖所示:(1)歡迎使用using system;using system.colle
5、ctions.generic;using system.componentmodel;using system.data;using system.drawing;using system.text;using system.windows.forms;using system.media;using system.data.sqlclient;namespace atm自動取款機(jī) public partial class 歡迎使用 : form public 歡迎使用() initializecomponent(); private void button1_click(object sen
6、der, eventargs e) this.visible = false; new 新用戶注冊().show(); private void button2_click(object sender, eventargs e) this.visible = false; new 用戶登錄().show(); private void button3_click(object sender, eventargs e) application.exit(); private void button4_click_1(object sender, eventargs e) this.visible
7、 = false; new 歡迎使用().show();private void button4_click_2(object sender, eventargs e) this.visible = false; new 注銷用戶().show(); (2)新用戶注冊namespace atm自動取款機(jī)public partial class 新用戶注冊 : form public 新用戶注冊() initializecomponent(); private void linklabel3_linkclicked(object sender, linklabellinkclickedevent
8、args e) /this.visible = false; /new 歡迎使用().show(); private void linklabel2_linkclicked(object sender, linklabellinkclickedeventargs e) /application.exit(); private void button1_click(object sender, eventargs e) 歡迎使用 a = new 歡迎使用(); if (textbox1.text = ) messagebox.show(用戶名不能為空!); textbox1.focus(); r
9、eturn; if (textbox7.text = ) messagebox.show(身份證號不能為空!); textbox7.focus(); return; if (textbox2.text = ) messagebox.show(密碼不能為空!); textbox2.focus(); return; if (textbox3.text = ) messagebox.show(住址信息不能為空!); textbox3.focus(); return; if (textbox4.text = ) messagebox.show(聯(lián)系電話信息不能為空!); textbox4.focus(
10、); return; if (textbox5.text = ) messagebox.show(開戶金額不能為空!); textbox5.focus(); return; if (textbox6.text = ) messagebox.show(個人帳號不能為空!); linklabel1.focus(); return; if (textbox10.text = ) messagebox.show(問題答案不能為空!); textbox10.focus(); return; if (textbox12.text = ) messagebox.show(問題答案不能為空!); textbo
11、x12.focus(); return; if (combobox1.text = ) messagebox.show(問題答案不能為空!); combobox1.focus(); return; if (combobox2.text = ) messagebox.show(問題答案不能為空!); combobox2.focus(); return; if (textbox2.visible != regex.ismatch(textbox2.text, d6$) textbox2.visible = true; messagebox.show(密碼必須是6位數(shù)字,請重新輸入!); textb
12、ox2.text = ; textbox2.focus(); return; if (textbox1.visible != regex.ismatch(textbox1.text, u4e00-u9fa52,$) textbox1.visible = true; messagebox.show(姓名必須是兩個漢字,請重新輸入!); textbox1.text = ; textbox1.focus(); return; if (textbox3.visible = regex.ismatch(textbox3.text, d0,$) textbox3.visible = true; messa
13、gebox.show(住址不能是數(shù)字,請重新輸入!); textbox3.text = ; textbox3.focus(); return; if (textbox4.visible != regex.ismatch(textbox4.text, d6,$) textbox4.visible = true; messagebox.show(聯(lián)系電話至少是6位數(shù)字,請重新輸入!); textbox4.text = ; textbox4.focus(); return; double khje = convert.todouble(textbox5.text); if (khje 2) labe
14、l6 .text =你已登錄失敗,此賬戶已凍結(jié)” return; 歡迎使用a = new歡迎使用(); string connectionstring = properties.settings.default.atmconnectionstring; sqlconnection conn = new sqlconnection(connectionstring); sqlcommand c = new sqlcommand(); c.commandtext = select * from 用戶個人信息 where 個人帳號= + textbox1.text + and 密碼=+textbox
15、2 .text +; c.connection = conn; conn.open(); sqldatareader r = c.executereader(); if (r.hasrows) s1 = textbox1.text; this.visible = false; new 個人業(yè)務(wù)().show(); else label5 .text =此用戶不存在或密碼錯誤; cm+; textbox1.focus(); return; private void button3_click(object sender, eventargs e) 歡迎使用 a = new 歡迎使用(); tex
16、tbox1.text = ; textbox2.text = ; private void textbox1_keypress(object sender, keypresseventargs e) 歡迎使用 a = new 歡迎使用(); private void textbox2_keypress(object sender, keypresseventargs e) 歡迎使用 a = new 歡迎使用(); private void 客戶登錄_load(object sender, eventargs e) (4)個人業(yè)務(wù)namespace atm自動取款機(jī) public partial
17、 class 個人業(yè)務(wù) : form public 個人業(yè)務(wù)() initializecomponent(); public static string kl=取款; private void button1_click(object sender, eventargs e) this.visible = false; new 查詢余額().show(); private void button2_click(object sender, eventargs e) this.visible = false; new 轉(zhuǎn)賬().show(); private void button5_click
18、(object sender, eventargs e) this.visible = false; new 歡迎使用().show(); private void button3_click(object sender, eventargs e) this.visible = false; new 取款().show(); private void button4_click(object sender, eventargs e) this.visible = false; new 取款().show(); private void 個人業(yè)務(wù)_load(object sender, even
19、targs e) /messagebox.show(s2); (5)存款 namespace atm自動取款機(jī) public partial class 存款 : form public 存款() initializecomponent(); private void button4_click(object sender, eventargs e) 歡迎使用 a = new 歡迎使用(); private void button1_click(object sender, eventargs e) 歡迎使用a = new歡迎使用(); this.visible = false; new歡迎使
20、用().show(); public static string s4 ; private void button2_click(object sender, eventargs e) if (textbox1.text = ) label6.text = 你還沒輸入存款金額; textbox1.focus(); return; try int ckje = convert.toint32(textbox1.text); if (ckje % 100 != 0) label7.text = 只能存整,不能存零; return; if (ckje 5000) label6.text = 一次最多
21、存5000元; textbox1.text = ; textbox1.focus(); return; string kk = datetime.today.tolongdatestring() + datetime.now.tolongtimestring(); sqlconnection connf = new sqlconnection(properties.settings.default.atmconnectionstring); sqlcommand cmdf = new sqlcommand(insert into 存?取?款? values( + s4 + , + label5
22、.text + , + textbox1.text + , + kk + ), connf); try connf.open(); cmdf.executenonquery(); label7.text = 存款成功;connf.close(); catch (exception f) messagebox.show(f.message); return; catch (exception err) messagebox.show(你輸入的信息格式不正確!,err .message ); private void button3_click(object sender, eventargs e
23、) 歡迎使用 a = new 歡迎使用(); this.visible = false; new 個人業(yè)務(wù)().show(); private void textbox1_keypress(object sender, keypresseventargs e) 歡迎使用 a = new 歡迎使用(); label6.text = ; label7.text = ; private void textbox1_mousedown(object sender, mouseeventargs e) label6.text = ; label7.text = ; private void 存款_loa
24、d(object sender, eventargs e) (6)取款namespace atm自動取款機(jī)public partial class 取款 : form public 取款() initializecomponent(); public static string s3 ; public void qk(string money) string kk = datetime.today.tolongdatestring() + datetime.now.tolongtimestring(); string connectionstring9 = properties.setting
25、s.default.atmconnectionstring; sqlconnection conn9 = new sqlconnection(connectionstring9); sqlcommand c9 = new sqlcommand(); c9.connection = conn9; conn9.open(); c9.commandtext = select * from 存取款 where 個人帳號= + and 類型=取款; string pa = (string)c9.executescalar();/第一次取款 if (pa = null) try string connec
26、tionstring6 = properties.settings.default.atmconnectionstring; sqlconnection conn6 = new sqlconnection(connectionstring6); sqlcommand c6 = new sqlcommand(); c6.connection = conn6; conn6.open(); c6.commandtext = select 金額 from 存取款 where 個人帳號= + s3 + and 類型=存款; double sum1 = convert.todouble(c6.execut
27、escalar(); double k, l; k = convert.todouble(money); l = convert.todouble(sum1 - k); if (l 0) label6.text = 余額不足; return; else sqlconnection connf = new sqlconnection(properties.settings.default.atmconnectionstring); sqlcommand cmdf = new sqlcommand(insert into 存取款 values( + s3 + , + label5.text + ,
28、 + money + , + kk + ), connf); try connf.open(); cmdf.executenonquery(); label6.text = 取款成功; connf.close(); catch (exception f) messagebox.show(f.message); return; catch (exception err) messagebox.show(err.message);/return; else/第二次取款成功 string connectionstring7 = properties.settings.default.atmconne
29、ctionstring; sqlconnection conn7 = new sqlconnection(connectionstring7); sqlcommand c7 = new sqlcommand(); c7.connection = conn7; try conn7.open(); c7.commandtext = select sum(金額) from 存取款 where 個人賬號= + s3 + and 類型=存款; decimal sum7 = convert.todecimal(c7.executescalar(); c7.commandtext = select sum(
30、金額) from 存取款 where 個人帳號= + s3 + and 類型=取款; decimal sum8 = convert.todecimal(c7.executescalar(); double w; w = convert.todouble(sum7 - sum8); double t, u; t = convert.todouble(money); u = convert.todouble(w - t); if (u 0)/余額不足 label6.text = 余額不足; return; else/余額可取時 sqlconnection connff = new sqlconne
31、ction(properties.settings.default.atmconnectionstring); /insert into 存款values( + textbox1.text + , + sdl + , + a + , + textbox3.text + , + datetime.today.tolongdatestring() + datetime.now.tolongtimestring() + ), connf); sqlcommand cmdff = new sqlcommand(insert into 存取款 values( + s3 + , + label5.text
32、 + , + money + , + kk + ), connff); try connff.open(); cmdff.executenonquery(); connff.close(); label6.text = 存取款成功; catch (exception f) messagebox.show(f.message); return; catch (exception err) messagebox.show(err.message);/return; private void button1_click(object sender, eventargs e) 歡迎使用 a = new 歡迎使用(); 自填金額.qx(double.parse(button1.text); qk(button1 .text); private void button2_click(object sender, eventargs e) 歡迎使用a = new歡迎使用(); 自填金額.qx(double.parse(button2.text); qk(button2.text); priv
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 《Dreamweaver CS5網(wǎng)頁設(shè)計與制作實例教程》課件-第1章 概述
- 2025年全球及中國應(yīng)急響應(yīng)無人機(jī)行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025年全球及中國用于光學(xué)應(yīng)用的超透鏡行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025年全球及中國單相柵極驅(qū)動器IC行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025年全球及中國臺式激光二極管驅(qū)動儀行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025-2030全球高山輸送機(jī)行業(yè)調(diào)研及趨勢分析報告
- 2025年全球及中國柵網(wǎng)型離子源行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025-2030全球大麻含量分析儀行業(yè)調(diào)研及趨勢分析報告
- 2025-2030全球藥品和食品防偽技術(shù)行業(yè)調(diào)研及趨勢分析報告
- 2025-2030全球立式高溫反應(yīng)釜行業(yè)調(diào)研及趨勢分析報告
- 小學(xué)畢業(yè)紀(jì)念冊教學(xué)課件
- 校本課程《生活中的化學(xué)》教案
- 寶典三猿金錢錄
- 個人房屋買賣購房合同
- 聚合物粘彈性
- 建筑工程施工現(xiàn)場安全資料管理規(guī)程解讀
- 養(yǎng)老護(hù)理員培訓(xùn)老年人日常生活照料
- 各種抽油泵的結(jié)構(gòu)及工作原理幻燈片
- 學(xué)習(xí)弘揚雷鋒精神主題班會PPT雷鋒精神我傳承爭當(dāng)時代好少年P(guān)PT課件(帶內(nèi)容)
- 社區(qū)獲得性肺炎的護(hù)理查房
- 體育賽事策劃與管理第八章體育賽事的利益相關(guān)者管理課件
評論
0/150
提交評論