醫(yī)院門診管理系統(tǒng)文檔_第1頁(yè)
醫(yī)院門診管理系統(tǒng)文檔_第2頁(yè)
醫(yī)院門診管理系統(tǒng)文檔_第3頁(yè)
醫(yī)院門診管理系統(tǒng)文檔_第4頁(yè)
醫(yī)院門診管理系統(tǒng)文檔_第5頁(yè)
已閱讀5頁(yè),還剩14頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、醫(yī)院門診管理系統(tǒng)文檔開(kāi)發(fā)工具:本系統(tǒng)使用access數(shù)據(jù)庫(kù)作為后臺(tái)數(shù)據(jù)管理,而在前端則使用ado對(duì)象和數(shù)據(jù)環(huán)境作為數(shù)據(jù)訪問(wèn)接口。它選用了目前最流行,使用最廣泛的可視化編程語(yǔ)言vb2008作為開(kāi)發(fā)環(huán)境。一. 醫(yī)院門診管理系統(tǒng)實(shí)現(xiàn)要求:(1)使用面向?qū)ο笏枷朐O(shè)計(jì)(2)有登錄模塊,能修改密碼(3)能夠錄入、修改、查詢、刪除科室信息(科室號(hào),科室名稱)(4)能夠錄入、修改、查詢、刪除病人信息(醫(yī)??ㄌ?hào),姓名)(5)能夠根據(jù)病人的選擇,讓其到那個(gè)科室就診,同時(shí)錄入產(chǎn)生的費(fèi)用科室病人添加信息(6)能夠根據(jù)科室號(hào)或科室名查詢?cè)摽剖沂罩芜^(guò)的所有病人信息及產(chǎn)生的費(fèi)用(7)能夠根據(jù)醫(yī)??ㄌ?hào)或姓名查詢?cè)摬∪嗽谀膫€(gè)科

2、室就診過(guò)及相關(guān)費(fèi)用(8)從高到低列出每個(gè)科室的就診人數(shù)科室病人查詢信息二.各模塊流程:門診處理系統(tǒng)用戶選擇登陸登陸科室病人修改信息修改密碼密碼科室病人刪除信息科室病人信息查詢系統(tǒng)統(tǒng)計(jì)查詢科室病人信息三.設(shè)計(jì)的門診管理界面:1.登陸界面的實(shí)現(xiàn):創(chuàng)立一個(gè)窗體form1作為主窗體,使用label,button,textbox等控件,合理的設(shè)計(jì)登陸界面,采用用戶輸入密碼登錄系統(tǒng),連接access數(shù)據(jù)庫(kù),從而連接下一個(gè)查詢表窗體。用戶密碼識(shí)別系統(tǒng),輸錯(cuò)密碼即不允許用戶進(jìn)入下一個(gè)界面。同時(shí),用戶可以修改已設(shè)置的密碼,再次登錄即采用新密碼認(rèn)證。2.修改密碼界面的實(shí)現(xiàn):form2窗體的設(shè)計(jì),涉及l(fā)abal,b

3、utton,textbox等控件,輸入原先正確的舊密碼后,可以輸入新密碼,再次確認(rèn)新密碼。需要注意的是密碼不能為空,也不能和原來(lái)一樣,如果舊密碼錯(cuò)誤的話,同樣不能進(jìn)行操作,最重要的是,兩次新密碼確認(rèn)如果不一致也不能進(jìn)行操作。3.科室信息病人信息界面的實(shí)現(xiàn):form3窗體的設(shè)計(jì)涉及到的內(nèi)容主要有添加,查詢,修改,刪除各個(gè)科室和病人的信息,以及連接到就診信息查詢表窗體。需要的ado控件主要有datagridview,,labal,button,textbox等等。各操作流程包括需要連接的數(shù)據(jù)庫(kù),各個(gè)參數(shù)設(shè)置,各控件的屬性設(shè)定,應(yīng)按所需,并且和datagridview數(shù)據(jù)綁定形成相應(yīng)。設(shè)計(jì)的窗體代碼

4、下面會(huì)有具體展示。4.查詢科室病人信息界面的實(shí)現(xiàn):form4窗體的設(shè)定,主要進(jìn)行的操作有按科室號(hào)或名,按病人醫(yī)??ㄌ?hào)或姓名查詢相應(yīng)的信息,并按照就診人數(shù)多少進(jìn)行排序。設(shè)計(jì)的ado控件則要有datagridview,labal,button等。正確的連接access數(shù)據(jù)庫(kù),進(jìn)而查詢要找的信息。詳細(xì)的代碼展示下面會(huì)有具體介紹。四.匯編的主要c#代碼:1.info類連接access數(shù)據(jù)庫(kù)的主要代碼:using system;using system.collections.generic;using system.linq;using system.text;using system.data;us

5、ing system.data.oledb;using windowsformsapplication1;using 登陸界面;namespace windowsformsapplication1 public class info public static form1 f; public static string myconnectionstr = provider=microsoft.ace.oledb.12.0;data source=d:c#課件登陸界面database11.mdb; public static string pname; public static string

6、pid; public static string num; public static form2 form2; public static form3 form3; public static ptinfo ptinfo; public static string user=admin; public static string password=123; 2.登陸界面主要代碼:namespace windowsformsapplication1 public partial class form1 : form public form1() initializecomponent();

7、private void btnlogin_click(object sender, eventargs e) oledbdatareader datareader = null; oledbconnection odbc = null; try string connstring = info.myconnectionstr; odbc = new oledbconnection(connstring); odbc.open(); string tsql = select * from t_user where username=? and mima=?; oledbcommand cmd

8、= new oledbcommand(tsql, odbc); cmd.parameters.clear(); oledbparameter pusername = new oledbparameter(cs1, oledbtype.varchar); pusername.value = txtusername.text.trim(); cmd.parameters.add(pusername); oledbparameter ppwd = new oledbparameter(cs2, oledbtype.varchar); ppwd.value = txtpassword.text.tri

9、m(); cmd.parameters.add(ppwd); datareader = cmd.executereader(); if (datareader.hasrows) datareader.close(); odbc.close(); this.hide(); form3 f = new form3(); f.show(); else datareader.close(); odbc.close(); messagebox.show(用戶名或密碼錯(cuò)誤!); catch (exception ex) datareader.close(); odbc.close(); messagebo

10、x.show(ex.message); 3.修改密碼主要代碼:private void btnchangepassword_click(object sender, eventargs e) this.visible = false; form2 form2 = new form2(); form2.showdialog(); this.visible = true; 4.信息表連接access數(shù)據(jù)庫(kù)代碼:private void btnadd_click(object sender, eventargs e) string myconnectionstring = info.myconnec

11、tionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = insert into t_ksinfo(t_ksid,t_ksm) values(?,?); oledbcommand mycommand = new oledbcommand(cmdstr, myconn); mycommand.parameters.clear(); oledbparameter p1 = new oledbparameter(cs1, oledbtype

12、.char); p1.value =txtksid.text.trim() ; mycommand.parameters.add(p1); oledbparameter p2 = new oledbparameter(cs1, oledbtype.char); p2.value =txtksm.text.trim(); mycommand.parameters.add(p2); mycommand.executenonquery(); myconn.close(); catch (exception ex) myconn.close(); messagebox.show(ex+數(shù)據(jù)庫(kù)連接失敗)

13、; private void button7_click(object sender, eventargs e) string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = select * from t_patient where t_ybid like ? and t_brxm like ?; oledbcommand mycommand = new

14、oledbcommand(cmdstr, myconn); mycommand.parameters.clear(); oledbparameter p3 = new oledbparameter(cs1, oledbtype.char); p3.value = % + txtybid.text.trim() + %; mycommand.parameters.add(p3); oledbparameter p4 = new oledbparameter(cs2, oledbtype.char); p4.value = % + txtptm.text.trim() + %; mycommand

15、.parameters.add(p4); oledbdatareader myddatareader = mycommand.executereader(); bindingsource bs = new bindingsource(); bs.datasource = myddatareader; datagridview2.datasource = bs; myconn.close(); messagebox.show(數(shù)據(jù)庫(kù)訪問(wèn)成功); catch (exception ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private

16、void btnupdate_click(object sender, eventargs e) int index; index = datagridview1.currentrow.index; string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = update t_ksinfo set t_ksinfo.t_ksid=?,t_ksinfo.t_

17、ksm=? where t_ksinfo.t_ksid= + datagridview1.rowsindex.cells0.value.tostring() + ; oledbcommand mycommand = new oledbcommand(cmdstr, myconn); oledbparameter p1 = new oledbparameter(cs1, oledbtype.char); p1.value = txtksid.text.trim(); mycommand.parameters.add(p1); oledbparameter p2 = new oledbparame

18、ter(cs1, oledbtype.char); p2.value = txtksm.text.trim(); mycommand.parameters.add(p2); mycommand.executenonquery(); messagebox.show(科室信息修改成功); myconn.close(); catch (exception ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void button3_click(object sender, eventargs e) string myconnectio

19、nstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = select * from t_ksinfo where t_ksid like ? and t_ksm like ?; oledbcommand mycommand = new oledbcommand(cmdstr, myconn); mycommand.parameters.clear(); oledbparameter p1

20、 = new oledbparameter(cs1, oledbtype.char); p1.value = % + txtksid.text.trim() + %; mycommand.parameters.add(p1); oledbparameter p2 = new oledbparameter(cs1, oledbtype.char); p2.value = % +txtksm.text.trim() + %; mycommand.parameters.add(p2); oledbdatareader myddatareader = mycommand.executereader()

21、; bindingsource bs = new bindingsource(); bs.datasource = myddatareader; datagridview1.datasource = bs; myconn.close(); messagebox.show(數(shù)據(jù)庫(kù)訪問(wèn)成功); catch (exception ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void btn_del_click(object sender, eventargs e) int index; index = datagridview

22、1.currentrow.index; string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = delete from t_ksinfo where t_ksid= + datagridview1.rowsindex.cells0.value.tostring() + ; oledbcommand mycommand = new oledbcomman

23、d(cmdstr, myconn); mycommand.parameters.clear(); mycommand.executenonquery(); messagebox.show(科室信息刪除成功); myconn.close(); catch (exception ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void button5_click(object sender, eventargs e) string myconnectionstring = info.myconnectionstr; oledbc

24、onnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = insert into t_patient(t_ybid,t_brxm,t_ksid,t_money,t_number) values(?,?,?,?,?); oledbcommand mycommand = new oledbcommand(cmdstr, myconn); mycommand.parameters.clear(); oledbparameter p3 = new oledbparamet

25、er(cs1, oledbtype.char); p3.value = txtybid.text.trim(); mycommand.parameters.add(p3); oledbparameter p4 = new oledbparameter(cs2, oledbtype.char); p4.value = txtptm.text.trim(); mycommand.parameters.add(p4); oledbparameter p5 = new oledbparameter(cs3, oledbtype.char); p5.value = cb_ksid.text.trim()

26、; mycommand.parameters.add(p5); oledbparameter p6 = new oledbparameter(cs4, oledbtype.char); p6.value = txtmoney.text.trim(); mycommand.parameters.add(p6); oledbparameter p7 = new oledbparameter(cs5, oledbtype.char); p7.value = txtnumber.text.trim(); mycommand.parameters.add(p7); mycommand.executeno

27、nquery(); messagebox.show(添加病人信息成功); myconn.close(); catch (exception ex) myconn.close(); messagebox.show(ex+數(shù)據(jù)庫(kù)連接失敗); private void button6_click(object sender, eventargs e) int index; index = datagridview2.currentrow.index; string myconnectionstring = info.myconnectionstr; oledbconnection myconn =

28、new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = update t_patient set t_patient.t_ybid=?,t_patient.t_brxm=? where t_patient.t_ybid= + datagridview2.rowsindex.cells0.value.tostring() + ; oledbcommand mycommand = new oledbcommand(cmdstr, myconn); oledbparameter p3 = new oled

29、bparameter(cs2, oledbtype.char); p3.value = txtybid.text.trim(); mycommand.parameters.add(p3); oledbparameter p4 = new oledbparameter(cs2, oledbtype.char); p4.value = txtptm.text.trim(); mycommand.parameters.add(p4); mycommand.executenonquery(); messagebox.show(病人信息修改成功); myconn.close(); catch (exce

30、ption ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void button8_click(object sender, eventargs e) int index; index = datagridview2.currentrow.index; string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); st

31、ring cmdstr = delete from t_patient where t_ybid= + datagridview2.rowsindex.cells0.value.tostring() + ; oledbcommand mycommand = new oledbcommand(cmdstr, myconn); mycommand.parameters.clear(); mycommand.executenonquery(); messagebox.show(病人信息刪除成功); myconn.close(); catch (exception ex) myconn.close()

32、; messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); 5.查詢病人信息科室信息主要代碼:private void button7_click(object sender, eventargs e) string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = select * from t_patient where t_ybid like ?

33、and t_brxm like ?; oledbcommand mycommand = new oledbcommand(cmdstr, myconn); mycommand.parameters.clear(); oledbparameter p3 = new oledbparameter(cs1, oledbtype.char); p3.value = % + txtybid.text.trim() + %; mycommand.parameters.add(p3); oledbparameter p4 = new oledbparameter(cs2, oledbtype.char);

34、p4.value = % + txtptm.text.trim() + %; mycommand.parameters.add(p4); oledbdatareader myddatareader = mycommand.executereader(); bindingsource bs = new bindingsource(); bs.datasource = myddatareader; datagridview2.datasource = bs; myconn.close(); messagebox.show(數(shù)據(jù)庫(kù)訪問(wèn)成功); catch (exception ex) myconn.

35、close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void btnupdate_click(object sender, eventargs e) int index; index = datagridview1.currentrow.index; string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = u

36、pdate t_ksinfo set t_ksinfo.t_ksid=?,t_ksinfo.t_ksm=? where t_ksinfo.t_ksid= + datagridview1.rowsindex.cells0.value.tostring() + ; oledbcommand mycommand = new oledbcommand(cmdstr, myconn); oledbparameter p1 = new oledbparameter(cs1, oledbtype.char); p1.value = txtksid.text.trim(); mycommand.paramet

37、ers.add(p1); oledbparameter p2 = new oledbparameter(cs1, oledbtype.char); p2.value = txtksm.text.trim(); mycommand.parameters.add(p2); mycommand.executenonquery(); messagebox.show(科室信息修改成功); myconn.close(); catch (exception ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void button3_clic

38、k(object sender, eventargs e) string myconnectionstring = info.myconnectionstr; oledbconnection myconn = new oledbconnection(myconnectionstring); try myconn.open(); string cmdstr = select * from t_ksinfo where t_ksid like ? and t_ksm like ?; oledbcommand mycommand = new oledbcommand(cmdstr, myconn);

39、 mycommand.parameters.clear(); oledbparameter p1 = new oledbparameter(cs1, oledbtype.char); p1.value = % + txtksid.text.trim() + %; mycommand.parameters.add(p1); oledbparameter p2 = new oledbparameter(cs1, oledbtype.char); p2.value = % +txtksm.text.trim() + %; mycommand.parameters.add(p2); oledbdatareader myddatareader = mycommand.executereader(); bindingsource bs = new bindingsource(); bs.datasource = myddatareader; datagridview1.datasource = bs; myconn.close(); messagebox.show(數(shù)據(jù)庫(kù)訪問(wèn)成功); catch (exception ex) myconn.close(); messagebox.show(ex + 數(shù)據(jù)庫(kù)連接失敗); private void btn_del_click(

溫馨提示

  • 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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論