资源描述:
《系统主要程序代码》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、沈阳理工大学学士学位论文系统主要程序代码医院信息管理系统--Module1:PublicDeclareFunctionShellExecuteLib"shell32.dll"Alias"ShellExecuteA"(ByValhwndAsLong,ByVallpOperationAsString,ByVallpFileAsString,ByVallpParametersAsString,ByVallpDirectoryAsString,ByValnShowCmdAsLong)AsLongGlobalUserTextAsString,
2、PurViewAsString'用户名和权限GlobalstrSearchStringAsString'查询字符串'GlobalstrFileTypeAsString,strFileIDAsString'文件类型GlobalConStrAsString,ITAsBoolean'连接字符串GlobalConnAsConnectionPublicPnoAsString'病人编号PublicDnoAsString'医生编号PublicSnoAsString'科室编号PublicSubGetStatus(StatusStringAsStri
3、ng)frmMain.StatusBar.Panels.Item(2).Text=StatusStringEndSubPublicSubcheckPath()OnErrorGoToerrHnd:SetConn=NewConnectionConn.OpenConStrstrCorrect=TrueExitSuberrHnd:MsgBox"您的数据库未能与系统建立连接,请检查数据库服务是否已经开启!",vbOKOnly+vbExclamation,"数据库联接错误"EndSub41沈阳理工大学学士学位论文PrivateSubMain()
4、ConStr="Provider=SQLOLEDB.1;PersistSecurityInfo=False;UserID=sa;InitialCatalog=medical;DataSource=wtw12"'ConStr="Provider=SQLOLEDB.1;PersistSecurityInfo=False;UserID=sa;InitialCatalog=Medical;DataSource=yh"frmLogin.ShowEndSub医院信息管理系统--frmadddoc:(录入档案系统)PrivateSubComman
5、d1_Click()IfText1.Text=""ThenMsgBox"请填写病人姓名!",,"提示"ExitSubEndIfConn.Execute"insertintopatient(pname,pno,psex,page,phistory1,phistory2,phistory3,phistory4,phistory5,pitem1,pitem2,pitem3,pitem4,pitem5)values('"&Text1.Text&"','"&Text2.Text&"','"&List1.Text&"','"&Text3.Tex
6、t&"',"_&"'"&Text4.Text&"','"&Text5.Text&"','"&Text6.Text&"','"&Text7.Text&"','"&Text8.Text&"','"&Text9.Text&"',"_&"'"&Text10.Text&"','"&Text11.Text&"','"&Text12.Text&"','"&Text13.Text&"')"MsgBox"添加档案记录成功",,"提示"Pno=Text2.Textfrmchoseddep.ShowUnloadMeEndSub41沈阳理工大学学士学位论文
7、PrivateSubCommand2_Click()UnloadMeEndSubPrivateSubForm_Load()DimtemRstAsRecordsetDimstrSqlAsStringDimNewPnoAsStringstrSql="selectmax(pno)frompatient"SettemRst=NewRecordsettemRst.OpenstrSql,Conn,adOpenKeyset,adLockOptimisticIfNottemRst.EOFAndNottemRst.BOFThenNewPno=IIf(
8、IsNull(temRst.Fields(0)),1,temRst.Fields(0)+1)EndIfText2.Text=NewPnoList1.ListIndex=0EndSub医院信息管理系统--frmchooseddep:(选